下面介绍几种for语句的变形:
1、for(int=0;;i++) {...}
2、int i=0;
for(;i<10){i++}
3、for(int i=0,j=10;i<=j;i++,i--){...}
for语句的作用域范围:
for循环中的i变量仅局限在循环括号中,超出for循环外变量i就无效。