Write a C++ Program to find the greatest number between three numbers.


SUBMITTED BY: Nrupeshsinh

DATE: June 23, 2016, 10:21 a.m.

FORMAT: Text only

SIZE: 285 Bytes

HITS: 823

  1. # include<iostream.h>
  2. # include<conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. int n,m,a,max;
  7. cout<<"Enter a Number :";
  8. cin>>n;
  9. cout<<"Enter a Number :";
  10. cin>>m;
  11. cout<<"Enter a Number :";
  12. cin>>a;
  13. max=(n>m)?n:m;
  14. max=(a>max)?a:max;
  15. cout<<"Greatest Number:"<<max;
  16. getch();
  17. }

comments powered by Disqus