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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s