文档介绍:作业一一一、 求一个任意边长的矩形面积。#include<>voidmain(){intw,h,sum;scanf("%d%d",&w,&h);sum=wGh;printf("area=%d\n",sum);}二、 求一个任意半径的圆的面积及周长。##include<>voidmain(){floatr,area,c;scanf("%f",&r);area=PIGrGr;c=2GPIGr;printf("area=%f\ncircle=%f\n",area,c);}三、 已知:w=5,P=4,z=2,求表达式:wGP/z的值,并输出。##include<>voidmain(){intw,P,z,r;w=5;P=4;z=2;r=wGP/z;printf("%5d",r);}作业二一、 从键盘上输入三个数,求出其中的最大值,并输出。#include<>voidmain(){inta,b,c,maG;scanf("%d%d%d",&a,&b,&c);maG=a;if(maG<b)maG=b;if(maG<c)maG=c;printf("maG=%d\n",maG);}二、 求sin3O0+sin6O0+cos3O°+cos6O0之和。(注意:)#include<>##include<>voidmain(){floata,b,sum;a=30GPI/180;b=60GPI/180;sum=sin(a)+sin(b)+cos(a)+cos(60);printf("total=%f\n",sum);G<P。}三、比较两个数的大小。如果 G大于P,则输出:G>P,否则输出:#include<>voidmain(){intG,P;scanf("%d,%d",&G,&P);if(G>P)printf("G>P\n");elseprintf("G<P\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(){intsum仁0,sum2=0,i,G;i=1;while(i<=10){scanf("%d",&G);if(G%2==0)sum仁sum1+G;elsesum2=sum2+G;i++;}printf("sum1=%d\nsum2=%d\n",sum1,sum2);} 作业四一、输入一个0〜6的整数,转换成星期输出。#include<>main(){inta;scanf("%d",&a);switch(a){caseO:printf("SundaP");break;case1:printf("MondaP");break;case2:printf("TuesdaP");break;case3:printf("WednesdaP");break;case4:printf("ThursdaP");break;case5:printf("FridaP");break;case6:printf("saturdaP");break;default:printf(".\n");}}.365,则输出显示为563。二、 输入一个整数,将各位数字反转后输出。如:输入#include<>voidmain(){intG,r;scanf("%d",&G);printf("converis:");while(G!=0){r=G%10;printf("%d",r);G=G/10;}printf("\n");}三、 输入一个整数,求出它的所有因子。#include<>voidmain(){intG,i;scanf("%d",&G);for(i=1;i<=G;i++)if(G%i==0)printf("%3d",i); 作业五一、求100〜200之