C语言
include[HTML_REMOVED]
int main ()
{
int a,b;//a为限速,b为车速度。
scanf(“%d”,&a);
scanf(“%d”,&b);
if(b-a>0)
{
if(b-a>=1&&b-a<=20)
printf(“You are speeding and your fine is $100.”);
if(b-a>20&&b-a<=30)
printf(“You are speeding and your fine is $270.”);
if(b-a>30)
printf(“You are speeding and your fine is $500.”);}
else
printf(“Congratulations, you are within the speed limit!”);
return 0;
}