Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // dsd.cpp : main project file.
- #include "stdafx.h"
- #include "stdio.h"
- #include "conio.h"
- using namespace System;
- int main()
- {
- int a,b,c,f,m,l;
- printf("enter 3 numbers\n");
- scanf("%d%d%d",&a,&b,&c);
- if (a<b && b<c)
- {
- f=a;
- m=b;
- l=c;
- printf("ascending order is %d %d %d",f,m,l);
- }
- else
- {
- f=a;
- m=c;
- l=b;
- printf("ascending order is %d %d %d",f,m,l);
- }
- if (b<a && a<c)
- {
- f=b;
- m=a;
- l=c;
- printf("ascending order is %d %d %d",f,m,l);
- }
- else
- {
- f=b;
- m=c;
- l=a;
- printf("ascending order is %d %d %d ",f,m,l);
- }
- if (c<a && a<b)
- {
- f=c;
- m=a;
- l=b;
- printf("ascending order is %d %d %d",f,m,l);
- }
- else
- {
- f=c;
- m=b;
- l=a;
- printf("ascending order is %d %d %d",f,m,l);
- }
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement