资源描述:
《山东科技大学OJ答案》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、WelcomeToSDUSTOJOnlineJudgeHomeWebBoardProblemSetStatusRanklist13 ContestF.A.Qs ModifyUser 201201050801 (0) Logout Problem1001#includeintmain(void){printf("HelloDa_min,HelloEr_min,HelloXiao_ming!");return0;}Problem1002#include#includeintmain(){intx,y;scanf("x=%d
2、,y=%d",&x,&y);printf("x+y:%d",x+y);printf("x-y:%d",x-y);printf("x*y:%d",x*y);printf("x/yquotient:%d,remainder:%d",x/y,x%y);printf("x^2:%d",x*x);printf("y^3:%d",y*y*y);//system("pause");return0;}Problem1003#includeintmain(void){floatr=0.0f;floatPerimeter=0.0f;floatArea=0.0f
3、;floatpi=3.14f;scanf("%f",&r);Perimeter=2.0f*pi*r;Area=r*r*pi;printf("Area:%.6f",Area);printf("Perimeter:%.6f",Perimeter);return0;}Problem1004#includeintmain(){inta,b,c;floatAver;scanf("%d%d%d",&a,&b,&c);Aver=(a+b+c)/3.0;printf("%.3f",Aver);return0;}Problem1005#includeint
4、main(){doublex,y;doublea,b,c,d,e,f,g,h,i;scanf("%lf%lf%lf",&a,&b,&c);scanf("%lf",&x);scanf("%lf",&y);d=x/100*a;e=x/100*b;f=x/100*c;g=y/a*100;h=y/b*100;i=y/c*100;printf("%.2lf%.2lf%.2lf",d,e,f);printf("%.2lf%.2lf%.2lf",g,h,i);return0;}Problem1006#includeintmain(){charx,y,z;scanf("%
5、c%c%c",&x,&y,&z);printf("%.3u%.3o%.3x",x,x,x);printf("%.3u%.3o%.3x",y,y,y);printf("%.3u%.3o%.3x",z,z,z);return0;}Problem1007#includeintmain(){intx;scanf("%d",&x);if(x%2==0)printf("even");elseprintf("odd");return0;}Problem1008#include#include#includeint
6、main(){intx,y;doublem,n;scanf("%d%lf",&x,&m);y=abs(x);n=fabs(m);printf("%d%g",y,n);return0;}Problem1008#include#include#includeintmain(){intm,n;doubleq,p;scanf("%d%lf",&m,&q);n=abs(m);p=fabs(q);printf("%d%g",n,p);return0;}Problem1009#includeintmain()
7、{intm,n,x;scanf("%d%d%d",&m,&n,&x);doubley,z;0n)y=z*0.88;elsey=z;printf("%.2lf",y);return0;}Problem1010#includeintmain(){intx;08、
9、x%400==0)printf("Yes");