1. Practical No.-4
Aim
:
To demonstrate the program for find greatest of three
numbers.
Source code :
#include<iostream.h>
#include<conio.h>
void main()
{
int a, b,c,greatest;
cout <<”Enter the three value of a,b,c”;
cin >>”a,b,c”
if(a>b)&&(a>c)
cout<<”greatest”<<greatest;
else if (b>a)&&(b>c)
cout<<”greatest”<<greatest;
else if (c>a)&&(c>b)
cout<<”greatest”<<greatest;
}
Output
:
Enter the three value of
A=10
B=15
C=25
greatest numbers is 25.