摘要: #includeusing namespace std;enum choice{ drawrect=1, getarea, getperim, changedimensions, quit};class rectangle{public: rectangle(int width,int height); ~rectangle(); int getheight()const{return i... 阅读全文
posted @ 2008-11-22 19:48 雨城 阅读(210) 评论(0) 推荐(0) 编辑
摘要: for(;;) { if(countermax) { cout"hello!"endl; counter++; } 阅读全文
posted @ 2008-11-22 17:19 雨城 阅读(223) 评论(0) 推荐(0) 编辑
摘要: int counter=0; for(;counter5;)//等同 for(counter=0;counter5;counter++) { counter++; cout"looping\n"; } 阅读全文
posted @ 2008-11-22 16:52 雨城 阅读(422) 评论(1) 推荐(0) 编辑
摘要: for(int i=0,j=0;i3;i++,j++) cout"i "i"j "jendl; 阅读全文
posted @ 2008-11-22 16:45 雨城 阅读(757) 评论(0) 推荐(0) 编辑
摘要: for (counter=0;counter5;counter++) cout"loop! "; 阅读全文
posted @ 2008-11-22 15:44 雨城 阅读(163) 评论(0) 推荐(0) 编辑
摘要: do { cout0); 阅读全文
posted @ 2008-11-22 15:20 雨城 阅读(324) 评论(2) 推荐(0) 编辑
摘要: while(true) { counter++; if(counter>10) break; } 阅读全文
posted @ 2008-11-22 15:08 雨城 阅读(276) 评论(0) 推荐(0) 编辑