在c中使用return(0)的用途是什么,因为我已经编写了一些可以在不使用return(0)的情况下正常运行的程序,请以一种非常简单的方式告诉我,我是c的初学者,如果答案很复杂,则可能让我更加困惑:(
先谢谢了 :)
#include <stdio.h>
#include <stdlib.h>
int main()
{
float km, meter, feet, inch, cm;
printf("Enter the distance(must be in km: \n");
scanf("%f", &km);
cm = 100000*km;
inch = 39370.1*km;
meter = 1000*km;
printf("The distance between the cities in cm is %f \n", cm);
printf("The distance between the cities in inches is %f \n", inch);
printf("The distance between the cities in meters is %f \n", meter);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
80 次 |
| 最近记录: |