Description questions
entered by the keyboard a three positive integer n. The mirror arrangement order of three numbers disrupted recombining a new three positive integers, so that the maximum value. Please help mirror the output value.
Input
enter a positive integer n, and 100 <= n <= 999.
Outputting
an output in accordance with requirements of the subject.
Examples of input
296
output example
962
data range
to 100% of the data, 100 <= n <= 999
#include"stdio.h"
void main(int argc, char* argv[])
{
int n,a,b,c,m1,m2,m3,x;
scanf("%d",&n);
a=n/100;
b=n/10%10;
c=n%10;
if(a>=b&&a>=c)
if(b>=c)
m1=a,m2=b,m3=c;
else
m1=a,m2=c,m3=b;
else
if(b>=a&&b>=c)
if(a>=c)
m1=b,m2=a,m3=c;
else
m1=b,m2=c,m3=a;
else
if(a>=b)
m1=c,m2=a,m3=b;
else
m1=c,m2=b,m3=a;
x=m1*100+m2*10+m3*1;
printf("%d",x);
}