how to determine the highest number in c 2b 2b

Solutions on MaxInterview for how to determine the highest number in c 2b 2b by the best coders in the world

showing results for - "how to determine the highest number in c 2b 2b"
Valentina
01 Nov 2017
1#include <iostream>
2using namespace std;
3
4int main() {
5    float n1, n2, n3;
6
7    cout << "Enter three numbers: ";
8    cin >> n1 >> n2 >> n3;
9
10    if((n1 >= n2) && (n1 >= n3))
11        cout << "Largest number: " << n1;
12    else if ((n2 >= n1) && (n2 >= n3))
13        cout << "Largest number: " << n2;
14    else
15        cout << "Largest number: " << n3;
16    
17    return 0;
18}