3.1示例程序p33

#include “stdio.h”
int main(void )
{
float weight ;
float value;
printf(“are you worth in rhodium ?/ n”);
printf(“let`s check it out .\n”);
printf("plese enter your weight in pounds ");
scanf( " %f ", &weight);//不要忘了scanf 要取地址
value = 700 * weight * 14.5833;
printf( "your weight in rhodium is worth $ %0.2f \n ",value);//要用%
printf(“your are easily worth that ! If rhodium prices drop \n”);
printf(“eat more to maintain your value.\n”);
return 0;//return 返回是一个int类型,
}在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_21475375/article/details/83926914