文档介绍:作业一求一个任意边长的矩形面积。#include<>voidmain(){intw,h,sum;scanf("%d%d",&w,&h);sum=w*h;printf("area=%d\n",sum);}求一个任意半径的圆的面积及周长。##include<>voidmain(){floatr,area,c;scanf("%f",&r);area=PI*r*r;c=2*PI*r;printf("area=%f\ncircle=%f\n",area,c);}已知:w=5,y=4,z=2,求表达式:w*y/z的值,并输出。##include<>voidmain(){intw,y,z,r;w=5;y=4;z=2;r=w*y/z;printf("%5d",r);}作业二从键盘上输入三个数,求出其中的最大值,并输出。#include<>voidmain(){inta,b,c,max;scanf("%d%d%d",&a,&b,&c);max=a;if(max<b)max=b;if(max<c)max=c;printf("max=%d\n",max);}求sin300。+sin600+cos300+cos600之和。(注意:30*)#include<>##include<>voidmain(){floata,b,sum;a=30*PI/180;b=60*PI/180;sum=sin(a)+sin(b)+cos(a)+cos(60);printf("total=%f\n",sum);}比较两个数的大小。如果x大于y,则输出:x>y,否则输出:x<y。#include<>voidmain(){intx,y;scanf("%d,%d",&x,&y);if(x>y)printf("x>y\n");elseprintf("x<y\n");}作业三输入a、b、c三个值,按从小到大排序输出。#include<>voidmain(){inta,b,c,t;scanf("%d%d%d",&a,&b,&c);if(a>b){t=b;b=a;a=t;}if(a>c){t=a;a=c;c=t;}if(b>c){t=b;b=c;c=t;}printf("%3d%3d%3d\n",a,b,c);}.求自然数1~10之和。。#include<>voidmain(){inti,sum;i=1;sum=0;while(i<=10){ sum=sum+i; i++;}printf("sum=%d\n",sum);}输入10个整数,统计出正数之和以及负数之和。(求奇数之和以及偶数之和)#include<>voidmain(){intsum1=0,sum2=0,i,x;i=1;while(i<=10){scanf("%d",&x);if(x%2==0)sum1=sum1+x;elsesum2=sum2+x;i++;}printf("sum1=%d\nsum2=%d\n",sum1,sum2);}作业四输入一个0~6的整数,转换成星期输出。#include<>main(){inta;scanf("%d",&a);switch(a){case0:printf("Sunday");break;case1:printf("Monday");break;case2:printf("Tuesday");break;case3:printf("Wednesday");break;case4:printf("Thursday");break;case5:printf("Friday");break;case6:printf("saturday");break;default:printf(".\n");}}.输入一个整数,将各位数字反转后输出。如:输入365,则输出显示为563。#include<>voidmain(){intx,r;scanf("%d",&x);printf("converis:");while(x!=0){r=x%10;printf("%d",r);x=x/10;}printf("\n");}输入一个整数,求出它的所有因子。#include<>voidmain(){ intx,i; scanf("%d",&x); for(i=1;i<=x;i++) if(x%i==0) printf("%3d",i);}作业五求100~200之间的素数。#include<>#i