Rabu, 25 Mei 2011

pertambahan

public class tambah{
    public static void main (String[] args){
        int [] data1={0,1,2,3,4,5};
        int [] data2={0,1,2,3,4,5};
        int jum,i,j;
        System.out.println("+ 0 1 2 3 4 5");
        System.out.println("--------------");
        for(i=0;i<=5;i++){
            System.out.print(i);
            for(j=0;j<=5;j++){
                jum=data1[i]+data2[j];
                System.out.print(" "+jum);
            }
           System.out.println(" ");
        }
    }
}


Tidak ada komentar:

Posting Komentar

chatme


ShoutMix chat widget