标签:des c style class blog code
常见的编程错误:
良好的编程习惯:
可移植性提示:
软件工程知识:
错误预防技巧:
C++版本
// Counter-controlled repetition with the for statement #include <iostream> using std::cout; using std::endl; int main() { // for statement header includes initialization // loop-continuation condition and increment for( int counter = 1; counter <= 10; counter++ ) cout << counter << " "; cout << endl; // output a newline return 0; // indicate successful termination } // end main
python版本
# -*- coding: utf-8 -*- """ Created on Sat Jun 07 22:25:06 2014 @author: Administrator """ for counter in range(1,11): print counter, print
计数器控制的for循环(C++/python版),布布扣,bubuko.com
标签:des c style class blog code
原文地址:http://www.cnblogs.com/tmmuyb/p/3775463.html