题解 | #牛牛的通勤#
牛牛的通勤
https://www.nowcoder.com/practice/1fe33d534843473eb086c4b42655e13d
#include <stdio.h>
int main() {
int walkv = 1;//走路速度
int carv = 10;//打车速度
int distance = 0;//公司距离
scanf("%d", &distance);//输入距离
int time1 = distance / 1;//走路所花时间
int time2 = distance / 10 + 10;//打车所花时间
if(time1 < time2)
{
printf("w\n");
}
else {
printf("v\n");
}
return 0;
}
C语言基础 文章被收录于专栏
里面较为详细的介绍了c语言的相关用法和有关题目。


