Gasoline Check ussage

hello guys, iam still very beginner in this programming c.
and my friend ask me if i can make this coding possible, so here is the case :

An automotive company needs a program that checks gasoline usages. This program can
be used to check the gasoline usages based on how fast the car move. As a programmer, you are
asked to create the program. Here are some rules about the program:
• At the beginning, the program will set the gasoline to 100 liters.
• Show the main menus, such as:
1. Start Driving
2. Rest
3. Exit
• If user chooses “Start Driving”, then the program will:
o Show the speed (km/hour) with random 1 – 100.
o If speed is less than 50 km/hour, gasoline will be reduced by 20 liters.
o If speed is equals or larger than 50 km/hour, gasoline will be reduced by 40 liters.
o If the gasoline is empty, then the program will show “Your gasoline is not enough
to run the car…”
• If user chooses “Rest”, then the program will:
o If the gasoline is full, then the program will show “Your gasoline is full…”, else the
gasoline will be increased by 20 liters.

if anyone can help me with this, really appreciate it
thanks
how does that help you create it ?
Last edited on
Topic archived. No new replies allowed.