Thursday 3 July 2014

Program to find biggest from 2 numbers by using conditional operator




//Biggest from two numbers
#include<iostream.h>
#include<conio.h>
void main ()
{
int a,b,big;
clrscr ();
cout<<"Enter two numbers:";
cin>>a>>b;
big=(a>b)?a:b;
cout<<"Biggest number is: "<<big;
getch();
}

No comments:

Post a Comment