摘要: #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 雨城 阅读(217) 评论(0) 推荐(0)
摘要: for(;;) { if(countermax) { cout"hello!"endl; counter++; } 阅读全文
posted @ 2008-11-22 17:19 雨城 阅读(234) 评论(0) 推荐(0)
摘要: int counter=0; for(;counter5;)//等同 for(counter=0;counter5;counter++) { counter++; cout"looping\n"; } 阅读全文
posted @ 2008-11-22 16:52 雨城 阅读(431) 评论(1) 推荐(0)
摘要: for(int i=0,j=0;i3;i++,j++) cout"i "i"j "jendl; 阅读全文
posted @ 2008-11-22 16:45 雨城 阅读(771) 评论(0) 推荐(0)
摘要: for (counter=0;counter5;counter++) cout"loop! "; 阅读全文
posted @ 2008-11-22 15:44 雨城 阅读(171) 评论(0) 推荐(0)
摘要: do { cout0); 阅读全文
posted @ 2008-11-22 15:20 雨城 阅读(330) 评论(2) 推荐(0)
摘要: while(true) { counter++; if(counter>10) break; } 阅读全文
posted @ 2008-11-22 15:08 雨城 阅读(281) 评论(0) 推荐(0)