Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double a;
- double b;
- double c;
- int main()
- {
- cout << "Please enter three numbers: ";
- cin >> a >> b >> c;
- if (a >= b && a>= c)
- {
- cout << a << " is the largest number" << endl;
- return 0;
- }
- if (b >= a && b >= c)
- {
- cout << b << " is the largest number" << endl;
- return 0;
- }
- else if (c >= a && c >= b)
- {
- cout << c << " is the largest number" << endl;
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement