num/=10是什么意思
问题描述:
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