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