Advertisement
Guest User

Numeros mayores enteros

a guest
Aug 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.34 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. // Opreradores logicos
  4.  
  5. int main()
  6. {
  7.    int num1 = 0;
  8.    int num2 = 0;
  9.    int num3 = 0;
  10.    std:: cout << "Dame el primer valor:";
  11.    std:: cin >> num1 ;
  12.    std:: cout << "Dame el segundo valor:";
  13.    std:: cin >> num2 ;
  14.    std:: cout << "Dame el tercer valor:";
  15.    std:: cin >> num3 ;
  16.    if ((num1 > num2) && (num1 > num3))
  17.    {
  18.        std:: cout << "El primer valor si es mayor que el segundo y el tercero:" << std:: endl;
  19.        std:: cout << num1 << std:: endl;
  20.    }
  21.    if  ((num1< num2) && (num1 < num3))
  22.    {
  23.       std:: cout << "El primer valor no es mayor que el segundo t el tercero" << std:: endl;
  24.    }
  25.    if ((num2 > num1) && (num2 > num3))
  26.    {
  27.       std:: cout << "El segundo valor si es mayor que el primero y el tercero" << std:: endl;
  28.       std:: cout << num2 << std:: endl;
  29.    }
  30.    if ((num2 < num1) && (num2 < num3))
  31.    {
  32.       std:: cout << "El segundo valor no es mayor que el primero y el tercero" << std:: endl;
  33.    }
  34.    if ((num3 > num1) && (num3 > num2))
  35.    {
  36.       std:: cout << "El tercer valor si es mayor que el primero y el segundo" << std:: endl;
  37.       std:: cout << num3 << std:: endl;
  38.    }
  39.    if ((num3 < num1) && (num3 < num2))
  40.    {
  41.       std:: cout << "El tercer valor no es mayor que el primero y el segundo" << std:: endl;
  42.    }
  43.    
  44. return 0;
  45.    
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement