c语言问题,求源程序,急求!

[复制链接]
查看11 | 回复0 | 2010-3-31 09:07:22 | 显示全部楼层 |阅读模式
#include#includevoid main(){float x,root;printf("enter a numnber:\n");scanf("%f\n",&x);root=sqrt(x);printf("the square root of %.1f%.1f\n",x,root);}void main(){float f,c;printf("enter the huashiwendu:\n");scanf("%f",&f);c=(f-32)*5/9;printf("seshi wendu is: %.2f\n",c);}void main(){int time1,time2,sh,sm,ah,am,time_h,time_m;scanf("enter two hour:%d\n%d\n",&time1,&time2);sh=time1/100;sm=time1%100;ah=time2/100;am=time2%100;if(am<sm) { ah--;am+=60;}time_h=ah-sh;time_m=am-sm;printf("the train journey time is %dhrs%dmins\n",time_h,time_m);}void main(){int inum,a,b,c,d,onum;printf("enter a number:\n");scanf("%d\n",&inum);a=inum/1000; a=(a+9)%10;b=(inum/100)%10; b=(b+9)%10;c=(inum/10)%10;c=(c+9)%10;d=inum%10;d=(d+9)%10;onum=c*1000+d*100+a*10+b;printf("the encrypted number is %d\n",onum);}大概就是这样,希望有帮助~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行