1 solutions
-
0
C :
#include <stdio.h> int main() { char a,b,c,temp; scanf("%c%c%c",&a,&b,&c); if(a>b) { temp=a,a=b,b=temp; } if(a>c) { temp=a,a=c,c=temp; } if(b>c) { temp=c,c=b,b=temp; } printf("%c%c%c\n",a,b,c); return 0; }C++ :
#include<iostream> using namespace std; int main() { char a,b,c; cin>>a>>b>>c; if (a>b) { char t=a; a=b; b=t; } if (a>c) { char t=a; a=c; c=t; } if (b>c) { char t=b; b=c; c=t; } cout<<a<<b<<c<<endl; return 0; }
- 1
Information
- ID
- 19654
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- (None)
- # Submissions
- 0
- Accepted
- 0
- Uploaded By