超速问题

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了超速问题相关的知识,希望对你有一定的参考价值。

#include<stdio.h>
int main()//高速路上的行驶问题 
{
    int a=0 ,b=0;
    printf("请输入该车道的限制速度:\n");
    scanf("%d",&a);
    printf("请输入行驶车速:\n");
    scanf("%d",&b);
    if(b>1.1*a && b<1.5*a)
    {
        printf("超速百分之10,罚款200元!\n");
    }
    if(b>1.5*a)
    {
        printf("超速百分之50,吊销驾驶执照!\n");
    }
    if(b<1.1*a)
    {
        printf("正常行驶!\n");
    }
    return 0;
}

 

以上是关于超速问题的主要内容,如果未能解决你的问题,请参考以下文章