练习3-2
高速公路超速处罚
#include<stdio.h>
int main()
{ int m,n;
float x;
printf("请输入车速和限速\n");
scanf("%d%d",&m,&n);
x=(1.0*m/n)-1;
if(x<0.1)
printf("ok\n");
if(x>=0.1&&x<=0.5)
printf("Excend %.0f%%.Ticket 200\n",100*x);
if(x>0.5)
printf("excend %.0f%%. License Revoked\n",100*x);
return 0;
}