问答详情
源自:5-14 综合练习

求大神指导下

#include <stdio.h>

    int  a=12//路程

    float  c=2.3//单价计费

    int   d=13//起步价

    int   e=3//起步价路程

    int   f=1//燃油附加税

    float  cost=((a-e)*c+d+f)*2

    if t>=5&&t<23

    {  

        c=2.3

    printf("起步价格为%d元\n",c);

    }

    else  

    {

    printf("%d\n",c*=1.2);

    }

    if a<=3

    {

    printf("%d\n",d);

    }

    else 

    {

    printf("%d\n",(a-e)*c+13);

    }

   int main()

{    cost=(a-e)*c+d+f)*2

    printf("小明每天打车的总费用为%d元\n",cost);

    return 0;

}


提问者:qq_慕桂英634821 2018-12-06 17:02

个回答

  • weixin_慕侠4463540
    2019-08-05 12:30:00

    还是重新学一遍课程吧,你的代码改到一半发现根本改不动