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