if A = 1 then
output= "excellent"
elseif A =2 then ...........
end if
------------------------------------------------------------------------
switch case A
case 1
output= "excellent"
case 2
output="Good"
case 3
output="pass"
#include
void main()
{
int choice;
do
{
scanf("%d",&choice);
}while(choice<1||choice>4);
switch(choice)
{
case 1:printf("Excellent\n");break;
case 2:printf("Good\n");break;
case 3:printf("Pass\n");break;
case 4:return;
}
}
请参照课本自己写,这种东西很简单的
你用java还是c语言阿?