Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a,b,c;
- int MAX(int a, int b, int c){
- if(a>c && a>b){
- return a;
- }
- else if (b>c && b>a){
- return b;
- }
- else{
- return c;
- }
- }
- int main()
- {
- cout << "Podaj 3 liczby: " << endl;
- cin >> a;
- cin >> b;
- cin >> c;
- cout << MAX(a,b,c) << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment