Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- float input1, input2, input3;
- cout << "Enter First Number : ";
- cin >> input1;
- cout << "Enter Second Number : ";
- cin >> input2;
- cout << "Enter Third Number : ";
- cin >> input3;
- cout << "Input numbers are : " << input1 << " " << input2 << " " << input3 << endl;
- if (input1==input2 && input2==input3)
- cout << input1 << ", " << input2 << ", " << " and " << input3 << " are all equal to each other.";
- else if (input1>input2 && input3==input1)
- cout << "First number and Third number are both the highest numbers.";
- else if (input2>input1 && input3==input2)
- cout << "Second number and Third number are both the highest numbers.";
- else if (input1>input3 && input2==input1)
- cout << "First number and Second number are both the highest numbers.";
- else if (input1>input2 && input1>input3)
- cout << input1 << " is the highest number among the input numbers.";
- else if (input2>input3 && input2>input1)
- cout << input2 << " is the highest number among the input numbers.";
- else if (input3>input1 && input3>input2)
- cout << input3 << " is the highest number among the input numbers.";
- }
Add Comment
Please, Sign In to add comment