Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int num1;
  8. int num2;
  9. int num3;
  10.  
  11. cout << "Enter an integers: ";
  12. cin >> num1;
  13. cout << endl;
  14.  
  15. cout << "Enter an integers: ";
  16. cin >> num2;
  17. cout << endl;
  18.  
  19. cout << "Enter an integers: ";
  20. cin >> num3;
  21. cout << endl;
  22.  
  23. if (num1 <= num2 && num3)
  24. cout << "This number is smallest: " << num1 << endl;
  25. else if (num2 <= num1 && num3)
  26. cout << "This number is smallest: " << num2 << endl;
  27. else
  28. (num3 <= num1 && num2);
  29. cout << "This number is smallest: " << num3 << endl;
  30. if (num1 >= num2 && num1 <= num3)
  31. cout << "This number is in between: " << num1 << endl;
  32. else if (num2 >= num3 && num2 <= num1)
  33. cout << "This number is in between: " << num2 << endl;
  34. else
  35. (num3 >= num1 && num3 <= num2);
  36. cout << "This number is in between: " << num3 << endl;
  37. if (num1 >= num2 && num3)
  38. cout << "This number is largest: " << num1 << endl;
  39. else if (num2 >= num1 && num3)
  40. cout << "This number is largest: " << num2 << endl;
  41. else if (num3 >= num1 && num2)
  42. cout << "This number is largest: " << num3 << endl;
  43. else
  44. cout << "They are equal." << endl;
  45.  
  46. return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement