Write A Program for printing three numbers in ascending order
# include<stdio.h> #include<conio.h> main() { int a, b, c; printf (“enter a, b, c values”); scanf ("%d%d%d”...
https://www.computersprofessor.com/2016/06/write-program-for-printing-three.html
# include<stdio.h>
#include<conio.h>
main()
{
int a, b, c;
printf (“enter a, b, c values”);
scanf ("%d%d%d”, & a, & b, &
c);
if (a > b && a > c)
{
if (b > c)
printf (“Ascending Order is % d \t %d \t %d”, c, b,
a);
else
printf (“Ascending Order is % d \t %d \t %d”, b, c,
a);
}
if ( b > a && b > c)
{
if ( a > c )
printf (“Ascending Order is % d \t %d \t %d”, c a, b);
else
printf (“Ascending Order is % d \t %d \t %d”,a, c, b);
}
if ( c > a && c > b)
{
if ( a > b)
printf (“Ascending Order is % d \t %d \t %d”, b,
a, c);
else
printf (“Ascending Order is % d \t %d \t %d”, a, b, c);
}
getch();
}