C++ programming to find the biggest and the smallest number between two numbers?
This c++ language programming is free all type of errors like the compiler and runtime errors and this programming is tested to compile and then run the program code.
Here is only programming code with the output. This programming output is customized to understand easily.
Find the biggest and the smallest number from three given numbers in c++
#include
using namespace std;
class Test {
public:
int a, b,c;
void biggest(int a, int b, int c) {
if(a>b && a>c){
cout<
}
else if(b>a && b>c){
cout<
}
else{
cout<
}
void smallest(int a, int b, int c) {
if(a
cout<
}
else if(b
cout<
}
else{
cout<
}
};
int main() {
Test o;
cout << “Please Enter the frist number: “;
cin >> o.a;
cout << “Please Enter the second Number: “;
cin >> o.b;
cout << “Please Enter the third Number: “;
cin >> o.b;
cout <<“—————–” << endl;
o.biggest(o.a, o.b, o.c);
cout <<“—————–” <
return 0;
}
Please Enter the frsit number: 12
Please Enter the second number: 15
Please Enter the third number: 11
—————–
15 is biggest than 12 and 11
—————–
11 is smallest than 12 and 15
I make this programming and hope you are like the post if are you like the post you can please comment and Share the post to reach more people.
If any doubt about this c++ programming code or input & output please comment below
If you have another question about c++ programming send an email by contacting us form is given on the page right side.
Please share your experience about this post,
Thank You!