#include <stdio.h> #include <math.h> #include <cmath> #define ROUNDING(x, dig) ( floor((x) * pow(float(10), dig) + 0.5f) / pow(float(10), dig) ) //double Rounding( double x, int digit ); int main(void) { int i; double a,b,c; double big=-999; double small=999; scanf("%lf %lf %lf",&a,&b,&c); if(a>big) big=a; if(b>big) big=b; if(c>big) big=c; printf("%.0f",ROUNDING( big,2 )); if(a<small) small=a; if(b<small) small=b; if(c<small) small=c; printf(" %.0f",ROUNDING(small,2)); double f[3]={a,b,c}; for(i=0; i<3; i++){ if(f[i]!=small) if(f[i]!=big) printf(" %.0f",f[i]); } return 0; }
2016.08.06 16:33
큰수작은수 나머지수 출력하기(승민)
조회 수 248 추천 수 0 댓글 0