sorcode buat looping


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

package looping;

/**
*
* @author laboran
*/
public class Main {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int b=5;
int c=2;
int i=3;
for( ;i<6;i=i+2 )

{
System.out.println("a="+i);

System.out.println("b="+b);
b=b-3;

System.out.println("c="+c);

c=c+3;

} System.out.println("c="+c);

}
}

Leave a comment