// 題目:
//依成績查看評等:
//90分(含)~100分(含)為A等
//80分(含)~89分(不含)為B等
//70分(含)~79分(不含)為C等
//60分(含)~69分(不含)為D等
//不滿60分者為E等
int intInput = 69; //輸入值
intInput = intInput / 10;
string strAns = "";
switch (intInput)
{
case 10:
case 9:
strAns = "A等";
break;
case 8:
strAns = "B等";
break;
case 7:
strAns = "C等";
break;
case 6:
strAns = "D等";
break;
default:
strAns = "E等";
break;
}
http://goodlucky.pixnet.net/blog/post/47753127
留言列表