class test{
public static void main(String args[]){
int i=0; //For Loops
int x=0; //For Total
int j=1; //For Series of Numbers
for (i=0;i<10;i++)
{
x=x+j;
j=j+2;
}
System.out.println("Answer is "+x);
}
}
class test{
public static void main(String args[]){
int i=0; //For Loops
int x=0; //For Total
int j=1; //For Series of Numbers
for (i=0;i<10;i++)
{
x=x+j;
j=j+2;
}
System.out.println("Answer is "+x);
}
}
Didn't find the answer you were looking for?