C++ Program – Find greatest using conditional

by Nideesh C on May 2, 2011 · 0 comments

in C++




//Downloaded From theonlinetutorials.com
//(C)1999.All rights reserved.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,by;
cout<<"Enter 2 nos"<<endl;
cin>>a>>b;
by=(a>b)?a:b;
cout<<"Greatest = "<<by;
getch();
}



Not Satisfied ? Just search & get the result

Related Posts Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. Sample – Program to find the sum of each row & column of a matrix of size n x m and if matrix is square, find the sum of the diagonals also..
  2. Sample – Program to enter an integer and find out if it is even or odd.
  3. Sample – Program to find the roots of a quadratic equation.
  4. Sample – Program to enter a sentence and output the number of uppercase & lowercase consonants, uppercase & lowercase vowels in sentence..
  5. Sample – Program to find the sum of either of the diagonals of a 4 x 4 matrix.

Leave a Comment

Previous post:

Next post: