诺丁汉
2017-06-14 22:41
#include <stdio.h>
int n
{
int sinpleMoney;
if(n<=3)
{
sinpleMoney=13;
printf("”小明单程费用%d\n",sinpleMoney);
}
else{
sinpleMoney=(n-3)*2.3+1+13;
printf("小明单程费用%d\n",sinpleMoney);
}
return 0;
}
int x
extern int n()
{
if(x>5&&x<23)
{
printf("小明单程费用%d\n",sinpleMoney);
}
else{
sinpleMoney*=1.2;
printf("小明上班或下班费用%d\n",sinpleMoney);
}
return 0;
}
int main()
{
int doubleMoney();
doubleMoney=sinpleMoney*2;
printf("小明每天回家费用%d\n",doubleMoney(12));
return 0;
#include<stdio.h>
int main()
{
int g, b,d; //g=上班时间;b=下班时间;use=打车费用;i为每公里单价;d=距离;
g = 9;
b = 6;
d = 12;
double i = 2.3;
double use;
if (d <= 3)
{
use = 13;
}
else if(g<=5||b>=23)//当时间在23点至第二天5点之间时
{
i *= 1.2;
}
else
{
use = 13 + (d - 3)*i;
}
printf("车费%.2lf", use);
}
C语言入门
926210 学习 · 20797 问题
相似问题