MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / main

Function main

Lab_02/05_largest_number.cpp:6–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace std;
5
6int main()
7{
8 float a, b, c;
9 cout << "Enter the 3 numbres: ";
10 cin >> a >> b >> c;
11
12 if (a >= b && a >= c)
13 cout << "The greatest number is " << a << ";" << endl;
14
15 if (b >= a && b >= c)
16 cout << "The greatest number is " << b << ";" << endl;
17
18 if (c >= a && c >= b)
19 cout << "The greatest number is " << c << ";" << endl;
20 else if (a == b == c)
21 cout << "All numbers are equal." << endl;
22
23 system("pause");
24 return 0;
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected