英语翻译

Ideal Weight
Write a program to compute the ideal weight for both males and females. According to one study, the ideal weight for a
female is 100 pounds plus 5 pounds for each inch in height over 5 feet. For example, the ideal weight for a female who is 5'3"
would be 100 + 15 = 115 pounds. For a male the ideal weight is 106 pounds plus 6 pounds for each inch in height over 5 feet.
For example, the ideal weight for a male who is 6'2" would be 106 + 14*6 = 190 pounds. Your program should ask the user
to enter his/her height in feet and inches (both as integers—so a person 5'3" would enter the 5 and the 3). It should then
compute and print both the ideal weight for a female and the ideal weight for a male. The general outline of your main
function would be as follows:
 Declare your variables (think about what variables you need—you need to input two pieces of information (what?), then
you need some variables for your calculations (see the following steps)
 Get the input (height in feet and inches) from the user
 Compute the total number of inches of height (convert feet and inches to total inches)
 Compute the ideal weight for a female and the ideal weight for a male (here you basically convert the "word" description
above to assignment statements)
 Print the answers
Plan your program, then type it in, compile and run it. Be sure it gives correct answers.
Enhance the Program a Bit The weight program would be a bit nicer if it didn't just give one number as the ideal weight for
each sex. Generally a person's weight is okay if it is within about 15% of the ideal. Add to your program so that in addition to
its current output it prints an okay range for each sex—the range is from the ideal weight minus 15% to the ideal weight plus
15%. You may do this by introducing new variables and assignment statements OR directly within your print statements.
希望有人尽快帮我翻译,感激不尽啊!!!!!!!!!

Ideal Weight
理想体重
Write a program to compute the ideal weight for both males and females. 编一个程序来计算男性和女性的理想体重。
According to one study, the ideal weight for a female is 100 pounds plus 5 pounds for each inch in height over 5 feet.
根据一项研究,女性理想体重的计算方法是 100磅+5磅*身高超过五英尺的部分(这一部分按英寸计算)
For example, the ideal weight for a female who is 5'3" would be 100 + 15 = 115 pounds.
比如,一个5英尺3英寸的女性,他的理想体重就应该是 100 + 15 = 115 磅。
For a male the ideal weight is 106 pounds plus 6 pounds for each inch in height over 5 feet.
对于男士来讲,理想体重是 106磅+6磅*身高超过五英尺的部分(按英寸计算)
For example, the ideal weight for a male who is 6'2" would be 106 + 14*6 = 190 pounds.
比如,一个身高6英尺2英寸的男士的理想体重是 106 + 14*6 = 190磅。
Your program should ask the user to enter his/her height in feet and inches (both as integers—so a person 5'3" would enter the 5 and the 3).
你的这个程序要让用户输入他/她的身高,按照英尺和英寸输入(两个数都应该是整数——所以一个5英尺3英寸的人应该输入 5 和 3)
It should then compute and print both the ideal weight for a female and the ideal weight for a male.
这个程序就可以进行计算,并且把适合男性和适合女性两种理想体重都打印出来。
The general outline of your main function would be as follows:
程序的主要功能概要如下:
 Declare your variables (think about what variables you need—you need to input two pieces of information (what?),
想清楚你的可变因素(想想你需要什么可变因素——你需要输入两部分信息(什么?))
then you need some variables for your calculations (see the following steps)
然后你的计算中需要一些可变因素(看以下步骤)
 Get the input (height in feet and inches) from the user
获得用户输入的内容(按照英尺和英寸写的身高)
 Compute the total number of inches of height (convert feet and inches to total inches)
计算身高的总英寸数(将英尺和英寸全部转换成英寸)
 Compute the ideal weight for a female and the ideal weight for a male (here you basically convert the "word" description above to assignment statements)
同时计算适合女性的理想体重和适合男性的理想体重(这里基本上你还要在指定描述中加入“文字”描述)
 Print the answers
打印结果
Plan your program, then type it in, compile and run it. Be sure it gives correct answers.
先设计程序,然后输入,编译,运行。要确保程序测试出的结果是正确的。
Enhance the Program a Bit The weight program would be a bit nicer if it didn't just give one number as the ideal weight for each sex.
加强一下你的程序。如果这个体重程序不是仅仅给出一个数字当作男女的理想体重的话会更好。
Generally a person's weight is okay if it is within about 15% of the ideal.
总的来讲,一个人的体重如果在理想体重上下的15%之内的话,那他的体重算是标准的。
Add to your program so that in addition to its current output it prints an okay range for each sex—the range is from the ideal weight minus 15% to the ideal weight plus 15%.
在你的程序中加入这一点,这样他就可以打印出一个男女理想体重的范围——范围是从理想体重值减去15% 一直到理想体值重加上15%。
You may do this by introducing new variables and assignment statements OR directly within your print statements.
你可以加入新的可变因素和制定描述,或者直接交一个打印的报表。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-03-08
理想体重
编写一个程序,计算出理想体重男性和女性都是这样。根据一项研究,理想的重量
女性是100英镑,另加5磅每英寸的高度超过5呎。为例,理想的女性体重是5 ' 3”
100 + 15 = 115磅。作为一个男性的理想体重106英镑,另加6磅每英寸的高度超过5呎。
例如,理想体重为一只公谁是6尺2”将是106 + 14 * 6 = 190磅。你的程序应该告诉用户
进入他的/她的身高脚与英寸(既作为一个人integers-so 5英尺3英寸就进入5和3)。它将
计算和打印两个理想体重对于一个女性的理想体重位男性。你的考试大纲街
功能将如左:
声明你的变量(想想变量你need-you需要输入两块信息(什么?),然后
你需要一些你的计算的变量(见下面的步骤)
计算出理想体重对于一个女性的理想体重为一只公(这里你简单的把“词”的描述
以上的赋值语句)
打印的答案
计划你的程序,然后输入、编译和执行他。肯定给正确的答案。
提高程序的一点重量程序会有点更好的如果没给一个号码为最理想的重量
每个性。通常一个人的体重是好的,如果那是在约15%的理想。加到你的计划,以便
第2个回答  2011-03-08
标准体重
第3个回答  2011-03-09
理想体重
写一个程序来计算男性和女性的理想体重。根据一项研究,一个理想体重
女性为100磅多的5每英寸身高5英尺磅。例如,一个女性的理想体重是谁5'3“
为100 + 15 = 115磅。对于男性的理想体重是106磅多的6每英寸身高5英尺磅。
例如,一个男性的理想体重是谁6'2“将是106 + 14 * 6 = 190磅。你的程序应要求用户
进入他/她的脚和英寸高(既为整数,因此一个人5'3“将进入5和3)。然后应
计算和打印女性和男性的理想体重的两个理想的体重。你的主要大纲
功能将是如下:
?声明变量(想想你需要什么变量,你需要输入以下两条信息(什么?),然后
您需要为您的计算一些变量(参见下面的步骤)
?获取用户输入(以英尺和英寸高)
?计算出的高度英寸(转换英尺和英寸总英寸)的总数
?计算为女性和男性的理想体重为理想体重(在这里你基本上转换“字”的说明
上面的赋值语句)
?打印的答案
计划你的程序,然后输入自己的,编译和运行它。可以肯定它提供正确的答案。
加强方案了一下体重方案将变得更好,如果它不只是给一个人的理想体重数
每个性别。通常一个人的体重是好的,如果它在大约15%的理想。添加到您的程序,以便在除了
它打印的电流输出为每个性别的范围好吗范围是从理想体重减去15%的理想体重加
15%。您可以通过在您的打印语句引入新的变量和赋值语句或直接的。