找回密码
 注册

QQ登录

只需一步,快速开始

查看: 893|回复: 1
收起左侧

无题

[复制链接]

该用户从未签到

发表于 2005-6-15 22:15 | 显示全部楼层 |阅读模式
#include void main() { int a,b; printf("lease enter 'a' and 'b':\n"); scanf("%d%d",&a,&b); if(a%b==0)   printf("a equipped b\n"); else   printf("a don't equipped b\n"); } 5-2 #include void main() { int a,b; printf("lease 'a' and 'b':\n"); scanf("%d%d",&a,&b); if(a*b>1000)   printf("%d*%d>1000\n",a,b); else if(a*b==1000)   printf("%d*%d=1000\n",a,b); } 5-3 #include void main() { int a,b; printf("laese enter 'a' and 'b':\n"); scanf("%d%d",&a,&b); if(a-b==a||b-a==a)   printf("Difference is equal to value \n",a); else if(a-b==b||b-a==b)   printf("Difference is equal to value \n",b); else   printf("Difference is not equal to any of values entered\n"); } 5-4 #include void main() { char Gread; int pay; printf("Please enter 'Gread' and 'pay':\n"); scanf("%c%d",&Gread,&pay); switch(Gread) { case 'A':   printf("Gongzi is %d\n",pay+300);   break; case 'B':   printf("Gongzi is %d\n",pay+250);   break; default:   printf("Gongzi is %d\n",pay+100);   break; } } 5-5 #include void main() { int marks; printf("Please enter 'marks':"); scanf("%d",&marks); if(marks>75)   printf("A级\n"); else if(marks>=60 && marks=45 && marks=35 && marks<45)   printf("D级\n"); else   printf("E级\n"); }

该用户从未签到

发表于 2005-6-15 22:18 | 显示全部楼层

无题

细胞分裂
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|《唐诗宋词》网站 ( 苏ICP备2021032776号 )

GMT+8, 2025-7-26 15:53 , Processed in 0.070524 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表