class forLooping
class forLooping
{
public static void main(String[] args)
{
int x = 3;
for (int i = 0; i < 10; i++)
{
System.out.println("Current value of x is " + x + " current value of i is " + i);
x = x + i;
} //end for loop
System.out.println("The final value of x is " + x);
} //end main
} //end class
Comments