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