P18 (1)
#include<> int main(void) { }
int celsius,fahr; fahr=150;
celsius=5*fahr/9-5*32/9;
printf(\ return 0;
(2)
#include<> int main(void) { }
int celsius,fahr; celsius=26;
fahr=9*celsius/5+32;
printf(\ return 0;
(3)
#include<> int main(void) {
int average,math,eng,comp;
}
math=87; eng=72; comp=93;
average=(math+eng+comp)/3;
printf(\ return 0;
(4)
#include<> int main(void) { }
int n,a,b,c; n=152; c=n; b=(n/10); a=n/100;
printf(\整数%d的个位数字是%d,十位数字是%d,百位数字是%d\\n\ return 0;
P27
(1)
#include<> #include<> int main(void) {
int celsius,fahr;
}
printf(\ scanf(\ fahr=9*celsius/5+32; printf(\ return 0;
(2)
#include<> #include<> int main(void) { }
int money,year; double rate,interest;
printf(\ scanf(\ interest=money*pow(1+rate,year)-money; printf(\ return 0;
(3)
#include<> #include<> int main(void) {
double x,y; printf(\
}
scanf(\ if(x<0){ } else{ }
printf(\ return 0;
y=sqrt(x);
y=pow(x+1,2)+2*x+1/x;
(4)
#include<> int main(void) { }
int x,y;
printf(\ scanf(\ printf(\ scanf(\
printf(\ printf(\ printf(\ printf(\ printf(\ return 0;
10的阶乘
#include<> int main(void) { }
int i,n,product; printf(\ scanf(\ product=1; for(i=1;i<=n;i++){ }
printf(\ return 0;
product=product*i;