Input three numbers, descending order

#include "stdio.h"
void main()
{
  int a,b,c,t;
  scanf("%d%d%d",&a,&b,&c);
  if(a>b)
  { t=b;
    b=a;
    a=t;
  }
  if(a>c)
  {
      t=a;
      a=c;
      c=t;
  
  }
  if(b>c)
  {
    t=b;
    b=C; 
    C = T; 
  } 
  the printf ( " ascending order: \ n- " ); 
  the printf ( " % D% D% D \ n- " , A, B, C); 
}

 

Guess you like

Origin www.cnblogs.com/zyz322/p/12232459.html