fbpx
  1. – Written in Turbo C++
  2.  
  3. # include <stdio.h>
  4.  #include<conio.h>
  5.  
  6. void main()
  7. {
  8. int a, b, c, maxi ;
  9.  clrscr();
  10. printf(” Enter Three numbers : “) ;
  11.  scanf(“%d %d %d”, &a, &b, &c) ;
  12.  
  13.   maxi= a > b ? (a > c ? a : c) : (b > c ? b : c) ;  // use of ternary OP
  14.  
  15. printf(“\n Maximum of three number : %d”, maxi) ;
  16. getch();
  17. }
 
 

Leave a Reply

×