新人求鞭打 求指点(问题第二帖)
#include <stdio.h>int main(void)
{
float weight;
//用户的体重
float value;
//相等重量的铑的价值
printf("Are you worth your weight in rhodium?\n");
printf("let's check it out.\n");
printf("Please enter your weight in pounds: ");
//从用户处获取输入
scanf("%f", &weight);
//假设铑为每盎司770美元
//14.5833把常衡制的英镑转换为金衡制的盎司
value = 770 * weight * 14.5833;
printf("Your weight in rhodium is worth $%.2f.\n". value);
printf("You are easily worth that! If rhodium prices drop, \n");
printf("eat more to maintain your value.\n");
return 0;
详细请见《c primer plus》 第三章开头例题
编译有一个错误 何解?