Advertisement
BojidarDosev

zadacha 3

Dec 6th, 2023
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. //zadacha 3
  4.  
  5. int main()
  6. {
  7. //gumi
  8. double x;
  9. cout << "Enter your tire pressure: " << "\n";
  10. cin>> x;
  11. //maslo
  12. cout << "Enter your amount of oil: " << "\n";
  13. double z;
  14. cin >> z;
  15. //fuel
  16. cout << "Enter your amount of fuel: " << "\n";
  17. double y;
  18. cin >> y;
  19. if (x < 1)
  20. {
  21. cout << "You cannot go, pump your tires!" << "\n";
  22. }
  23. else if (x >= 1 && x <= 2.3)
  24. {
  25. cout << "Pump it to 2.4 bars!" << "\n";
  26. }
  27.  
  28. if (z < 1.5)
  29. {
  30. cout << "You cannot go! Oil levels too low!" << "\n";
  31. }
  32. else
  33. {
  34. cout << "Oil levels are okey. " << "\n";
  35. }
  36.  
  37. if (y < 25)
  38. {
  39. cout << "Go and refuel until 50litres!" << "\n";
  40. }
  41. else
  42. {
  43. cout << "Fuel levels are good. " << "\n";
  44. }
  45. }
  46.  
  47.  
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement