P27 (2): #include
int year;
double interest,money,rate;
printf(\
scanf(\
interest=money*pow((1.0+rate),year)-money;
printf(\
return 0; }
P28 (3):
#include
double x; double y;
printf(\ scanf(\
if(x<0){
y=pow(x+1,2)+2*x+1/x; } else{
y=sqrt(x); }
printf(\
return 0; }
P28 (4):
#include
#include
int num1,num2;
printf(\ scanf(\ printf(\ scanf(\
printf(\ printf(\ printf(\ printf(\
printf(\
return 0; }
思考:
#include
double num1,num2; printf(\ scanf(\ printf(\ scanf(\
printf(\ printf(\ printf(\ printf(\
// printf(\
return 0;
} (其中最后一句不能执行!)
P28 (5): P28(6):
P34 (1):
#include
{
int m,sum;
printf(\ scanf(\
sum=0;
for(m;m<=100;m++) {
sum=sum+m; }
printf(\
return 0; }
思考:
#include
int m,n,sum;
printf(\ scanf(\ printf(\ scanf(\
sum=0;
for(m;m<=n;m++) {
sum=sum+m; }
printf(\
return 0; }
P34 (2):
#include
int m,n;
double item,sum;
printf(\ scanf(\