- 59
- 0
- 约1.91千字
- 约 53页
- 2020-10-10 发布于广东
- 举报
第一章;hello world! hello hit!
hello everyone!
提示:
在 printf()函数中转义字符‘\n’表示换行。
输入格式:;5;5;5;6;return 0;
}
3.4
计算体指数(3 分)
题目内容:
从键盘输入某人的身高(以厘米为单位,如 174cm)和体重(以公斤为单位,如 70 公斤),将身高(以米为单位,如 1.74m)和体 重(以斤为单位,如 140 斤)输出在屏幕上,并按照以下公式计算并输出体指数,要求结果保留到小数点后 2 位。
假设体重为 w 公斤,身高为 h 米,则体指数的计算公式为:;8;9;10;11;Please enter the number:
10923↙
error!
输??格式:
%d
输出格式:
输入提示信息:Please enter the number:\n
输出的区间判断:
%d: 1000-9999\n %d: 100-999\n %d: 10-99\n
%d: 0-9\n
输入错误提示信息:error!\n
输入样例:;程序运行结果示例 1:
Please enter the coefficients a,b,c:
1,2,1↙
x1=-1.0000, x2=-1.0000
程序运行结果示例 2:
Please enter the coefficients a,b,c:
2,6,1↙
x1
原创力文档

文档评论(0)