Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- float MAX(float a, float b, float c)
- {
- float m=a;
- if(b>=m)
- {
- m=b;
- }
- if(c>=m)
- {
- m=c;
- }
- return m;
- }
- int main()
- {
- cout << MAX(5, 6, 2) << endl;
- cout << MAX(-69, 0, 42) << endl;
- cout << MAX(20.4, 20.3, -4.64) << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment