好文档 - 专业文书写作范文服务资料分享网站

C语言程序设计实验与习题指导课后程序设计答案

天下 分享 时间: 加入收藏 我要投稿 点赞

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;

C语言程序设计实验与习题指导课后程序设计答案

P18(1)#includeintmain(void){}intcelsius,fahr;fahr=150;celsius=5*fahr/9-5*32/9;printf(\return0;(2)#includeintmain(void){}<
推荐度:
点击下载文档文档为doc格式
1r6e3712p652amw9lhr375cln2z0an008fl
领取福利

微信扫码领取福利

微信扫码分享