Repeticion (while, for, do)
CUADRADOS
public class Cuadrados {
public static void main(String[] args) {
int b;
for(int a=1;a<=10;a++){
b=a*a;
System.out.println(b);
}
}
}
NONES
public class Nones {
public static void main(String[] args) {
int b=2,c;
for(int a=1;a<=10;a++){
c=b*a-1;
System.out.println(c);
}
}
}
SUMA
public class Suma {
public static void main(String[] args) {
int b=0;
for(int a=1;a<=10;a++){
b=b+a;
System.out.println(b);
}
}
}