/* 3.1 */#include<stdio.h>intmain(void){
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);
value =1700.0* weight *14.5833;printf("You 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");return0;}
/*3.2 演示了遗漏参数带来的随机性 */#include<stdio.h>intmain(void){
int ten =10;int two =2;printf("Doing it right: ");printf("%d minus %d is %d\n",ten,2,ten - two);printf("Doing it wrong: ");printf("%d minus %d is %d\n
第三章/* 3.1 */#include<stdio.h>int main(void){ float weight; float value; printf("Are you worth your weight in platinum?\n"); printf("Let's check it out.\n"); printf("Please enter yo...