Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- int a = 67, b = 10, c = 98;
- printf("a = %d, b = %d, c = %d\n", a, b, c);
- if (a > b) {
- if (b > c) {
- int temp = a;
- a = c;
- c = temp;
- }
- else {
- if (a > c) {
- int temp = a;
- a = b;
- b = c;
- c = temp;
- }
- else {
- int temp = a;
- a = b;
- b = temp;
- }
- }
- }
- else{
- if (a > c){
- int temp = a;
- a = c;
- c = b;
- b = temp;
- }
- else {
- if (b > c) {
- int temp = b;
- b = c;
- c = temp;
- }
- }
- }
- printf("a=%d, b=%d, c=%d\n", a, b, c);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement