9 dic 2013

java application matrici 3

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication20;

/**
 *
 * @author internet
 */
public class JavaApplication20 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int m[][]=new int[10][10];
        int a = 0,b=0;
        m[a][b]=0;
        for (int j=0; j<10 j="">)
            {for (int i=0; i<10 i="" p="">                       {m[a][b]=m[a][b]+1;
        if(m[a][b]%3==0)
        System.out.print(" "+m[a][b]);          
        }
           System.out.println();  
        }
    }
}

Nessun commento:

Posta un commento