for (initialization; test condition; iteration statement){
Statement(s) to be executed if test condition is true
}
例子:
下面的例子说明一个基本的for循环:
这将产生以下结果,它类似于while循环:
Starting Loop Current Count : 0 Current Count : 1 Current Count : 2 Current Count : 3 Current Count : 4 Current Count : 5 Current Count : 6 Current Count : 7 Current Count : 8 Current Count : 9 Loop stopped!



