非常简单的小问题
LI-O 2013-01-25 08:43:25 #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);
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("est more to maintain your value.\n");
return 0;
}
在这个东西里面的
printf("Your weight in rhodium is worth $%.2f.\n",value);
。。其中 $%.2f 求详解。。