回复 5楼 zmf876870302
代码如下,快哭了,去百度知道问,去CSDN注册发帖,在BCCN论坛注册发帖。
求帮助,非常感谢!
#include<stdio.h>
int main()
{
float weight;
float value;
//相等重量的白金价值//
printf("Are you worth your weight in platinum?\n");
printf("Let's check it out.\n");
printf("Please enter your weight in pounds:");
//获取用户的输入//
scanf("%f ",&weight);
//假设白金的价格是每盎司
$1700.//
//14.5833用于把英镑常衡盎司转换成金衡盎司//
value=1700.0*weight*14.5833;
printf("Your weight in platinum is worth $%.2f.\n",value);
printf("You are easily worth that!If platinum prices drop,\n");
printf("eat more to maintain your value.\n");
getchar();
getchar();
return 0;
}