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