Jumat, 12 Oktober 2012

 

Prima :
 public static void main(String [] args){
            int i,temp;
            int iawal,iakhir;
            Scanner input = new Scanner(System.in);
      
            iawal = 1;
            iakhir = 20;
            System.out.println("Masukan Inputan Awal Anda = "+ iawal);
            System.out.println("Masukan inputan Akhir Anda = "+ iakhir);

            i = iawal;
          
            for (i=iawal;i                 for (int j=i;j                if((j%j==0)){
                   // for(temp=i;(temp%temp==1) && (temp%2==1);i--)
                    if((j%2==1)){
                    System.out.print(j+ " ");}}
                }

            }

0 komentar: