class Test04 {
public static void main(String[] args) {
for (int t = 1;t <= 10;) {
System.out.println(t);
t++; //控制语句不一定要放在括号里
}
int t = 1;
while (t++ <= 10) {
System.out.println(t - 1);
}
int c = 1;
do {
System.out.println(c);
c++;
}
while (c <= 10);
}
}
|
|