Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int Max(int &a, int &b, int &c) {
- if ((a > b) && (a > c)) {
- return a;
- }
- else
- {
- if ((b > a) && (b > c))
- {
- return b;
- }
- else {
- return c;
- }
- }
- }
- void main()
- {
- int a, b, c;
- cout << " nhap 3 so a b c :";
- cin >> a >> b >> c;
- cout << "Max la :";
- cout << Max(a, b, c);
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement