Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. double x, y, z;
  8.  
  9. cout << "Input X: ";
  10. cin >> x;
  11.  
  12. cout << "Input Y: ";
  13. cin >> y;
  14.  
  15. cout << "Input Z: ";
  16. cin >> z;
  17.  
  18. if ((x > y) && (x > z))
  19. {
  20. cout << "X have the biggest value: " << x;
  21. }
  22.  
  23. else if ((y > x) && (y > z))
  24. {
  25. cout << "Y have the biggest value: " << y;
  26. }
  27.  
  28. else if ((z > x) && (z > y))
  29. {
  30. cout << "Z have the biggest value: " << z;
  31. }
  32.  
  33. else
  34. {
  35. cout << "ALL VALUES ARE EQUAL";
  36. }
  37.  
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement