c - 使用回报(0)
问题描述
在 C 中有什么用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);
}
解决方案
推荐阅读
- ubuntu - 如何将 1920x1200 分辨率添加到 Ubuntu 20.04
- android - 无法转换 constraintlayout-solver-2.0.4.jar
- yii2 - Yii2 Stripe Webhook 测试:“[错误] 发布失败”
- javascript - 传单 - 功能仅适用于缩放
- mongodb - 错误的 pem 文件或 Docker 桌面权限
- multidimensional-array - 获取 java.lang.ArrayIndexOutOfBoundsException:将 2d(动态列)数组转换为 1d 数组时,索引 3 超出长度 3 的范围
- eclipse - Lombok 安装程序不适用于带有 Gradle 项目的 Eclipse
- python - 为什么 list[0:len(list)+1:-1] 返回一个空列表?
- nginx - NGINX 不会在自定义目录中提供 html
- node.js - 开玩笑 - 多个 websocket 连接挂起开玩笑