这里注意百分号通过%%输出,且超速比例p最好设置为浮点数,然后保留到个位。
`#include <stdio.h>
int main()
{
int a,b;
float p;
scanf("%d %d",&b,&a);
if(b>a){
p=(b-a)/(float)a*100;
if(p>=10&&p<50){
printf("Exceed %.0lf%%. Ticket 200\n",p);
}else if(p>=50){
printf("Exceed %.0lf%%. License Revoked\n",p);
}else{
printf("OK\n");
}
}else{
printf("OK\n");
}
return 0;
}