Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a, b, c;
  8.  
  9.     cin>>a>>b>>c;
  10.  
  11.     if(a>b){
  12.         if(b>c){
  13.             cout<< a<<" a legnagyobb es "<< c << " a legkisebb";
  14.         }else if(a>c){
  15.             cout<< a<<" a legnagyobb es "<< b << " a legkisebb";
  16.         }else{
  17.             cout<< c<<" a legnagyobb es "<< b << " a legkisebb";
  18.         }
  19.     }
  20.  
  21.     if(b>a){
  22.         if(a>c){
  23.             cout<< b<<" a legnagyobb es "<< c << " a legkisebb";
  24.         }else if(b>c){
  25.             cout<< b<<" a legnagyobb es "<< a << " a legkisebb";
  26.         }else{
  27.             cout<< c<<" a legnagyobb es "<< a << " a legkisebb";
  28.         }
  29.     }
  30.  
  31.  
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement