[理工] [程式] C語言

看板Grad-ProbAsk作者 (doggingg)時間15年前 (2011/02/09 14:18), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
Please rewrite the code segment shown below in a "while" statement and a "for" statement in C++: total=0; do{ cin>>grade; if(grade!=-1) total+=grade; }while(grade!=-1); 抱歉,小弟不是資工系的,之前沒念過程式,請問這題該怎麼寫? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.208.78
文章代碼(AID): #1DKZ6SA5 (Grad-ProbAsk)
討論串 (同標題文章)
文章代碼(AID): #1DKZ6SA5 (Grad-ProbAsk)