num/=10是什么意思(2).用switch语句main(){int num;char grade;scanf(%d,&num);num/=10;switch(num){case 10:case 9:grade='A';break;case 8:grade='B';break;case 7:grade='C';break;case 6:grade='D';break;default:grade='E';break;}printf(%c,grade);}

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 23:38:45
num/=10是什么意思(2).用switch语句main(){intnum;chargrade;scanf(%d,&num);num/=10;switch(num){case10:case9:gra

num/=10是什么意思(2).用switch语句main(){int num;char grade;scanf(%d,&num);num/=10;switch(num){case 10:case 9:grade='A';break;case 8:grade='B';break;case 7:grade='C';break;case 6:grade='D';break;default:grade='E';break;}printf(%c,grade);}
num/=10是什么意思
(2).用switch语句
main()
{
int num;
char grade;
scanf(%d,&num);
num/=10;
switch(num)
{
case 10:
case 9:
grade='A';
break;
case 8:
grade='B';
break;
case 7:
grade='C';
break;
case 6:
grade='D';
break;
default:
grade='E';
break;
}
printf(%c,grade);
}

num/=10是什么意思(2).用switch语句main(){int num;char grade;scanf(%d,&num);num/=10;switch(num){case 10:case 9:grade='A';break;case 8:grade='B';break;case 7:grade='C';break;case 6:grade='D';break;default:grade='E';break;}printf(%c,grade);}
num /= 10
等同于
num = num / 10
同理
num += 10
等同于
num = num + 10
num -= 10
等同于
num = num - 10
num *= 10
等同于
num = num * 10