#include<iostream.h>
#include<conio.h>
class
greatest
{
//global
variable
int
x,y,z;
public:
//local
variable is m & n
void
input(int m,int
n,int o)
{
x=m;
y=n;
z=o;
}
void
find()
{
if(x>y)
{
if(x>z)
{
cout<<"\n\t"<<x<<" is greater";
}
else
{
cout<<"\n\t"<<z<<" is greater";
}
}
else if(y>z)
{
cout<<"\n\t"<<y<<" is greater";
}
else
{
cout<<"\n\t"<<z<<" is greater";
}
}
};
void
main()
{
int x,y,z;
clrscr();
greatest obj;
cout<<"\n\tEnter
Number1 ";
cin>>x;
cout<<"\n\tEnter
Number2 ";
cin>>y;
cout<<"\n\tEnter
Number3 ";
cin>>z;
obj.input(x,y,z);
obj.find();
getch();
}
|
Computer Science :: 11th/12th, Computer Engineering :: Degree/Diploma, Coding Concept ( C, C++ & JAVA Programming, JDBC Concept, DBMS - SQL Concept, Data Structure, Communication & Network Concept.
GREATEST AMONG THREE VARIABLE
Subscribe to:
Comments (Atom)
Make Code Arcade : Area of Circle
Make Code Arcade : Area of Circle Editor Simulator
-
COMPUTER TERMINOLOGY 1) TCP/IP - Transmission Control Protocol/ Internet Protocol. 2) HTTP...
-
Marks Division HOE 30 Marks IT Application Report File 20 Marks Viva - Voce 10 Marks 1) Write an HTML code to generate a web p...
-
Check whether the number is negative or positive after taking a number as input from the user. TextWindow . WriteLine ( "Ente...
-
https://makecode.com/_3VxaMo6c3YPp Code 1) What is Make Code Arcade? Answer: Make Code Arcade is a Block based coding. 2) Writ...
-
1) ___ is the response of the receiver after perceiving the message. a) Encoding b) Decoding c) Channel d) Feedback 2) Which of the fo...
No comments:
Post a Comment