#include <stdio.h>
#include <stdlib.h>
int main()
{
float cs,xs;
float chao;
int x;
printf("输入在一行中给出2个正整数,分别对应车速和限速,其间以空格分隔cs xs:\n");
while( scanf("%f%f",&cs,&xs)!=EOF)
{
chao=(cs-xs)/xs;
x=chao*100;
if(x<10&&x>=0)
printf("ok");
else if(x>0&&x<=10)
{
printf("eceed %d%%.ticket200\n",x);
}
else if(x>=50)
printf("eceed%d%% license revoked",x);
}
return 0;
}
汽车超速问题
最新推荐文章于 2021-11-23 23:52:31 发布