OOPC Practical 7


Practical : 7
Subject : Object Oriented Programming with C++

Aim : C++ program to find largest number from given


Source Code :
#include<iostream.h>
#include<conio.h>
inline int large(int a,int b,int c)
{
if(a>b)
{
if(a>c)
return a;
else
return c;
}
else
{
if(b>c)
return b;
else
return c;
}
}
void main()
{
clrscr();
int x,y,z;
cout<<"enter the value :\n";
cin>>x>>y>>z;
cout<<"largest num is : "<<large(z,y,x);
getch();
}

Output :


Pratik Boghani

Author & Editor

Life is all about the next step.

0 comments:

Post a Comment