Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- //zadacha 3
- int main()
- {
- //gumi
- double x;
- cout << "Enter your tire pressure: " << "\n";
- cin>> x;
- //maslo
- cout << "Enter your amount of oil: " << "\n";
- double z;
- cin >> z;
- //fuel
- cout << "Enter your amount of fuel: " << "\n";
- double y;
- cin >> y;
- if (x < 1)
- {
- cout << "You cannot go, pump your tires!" << "\n";
- }
- else if (x >= 1 && x <= 2.3)
- {
- cout << "Pump it to 2.4 bars!" << "\n";
- }
- if (z < 1.5)
- {
- cout << "You cannot go! Oil levels too low!" << "\n";
- }
- else
- {
- cout << "Oil levels are okey. " << "\n";
- }
- if (y < 25)
- {
- cout << "Go and refuel until 50litres!" << "\n";
- }
- else
- {
- cout << "Fuel levels are good. " << "\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement