A Gas Station • You have been asked to create a C program to manage the gas pumps at a gas station. The station has four pumps connected to four tanks with capacities: 100, 75, 50, and 150. Every time a car fills up it takes 10 gallons. You’ll know that a car has arrived because the carArrived function will return with a pump number. After a car has filled up, print out the current contents of all four tanks. • Write a C program that can track each of the four tanks. Update the amount of gas remaining in a tank when a car fills up. When a tank gets to less than 20 gallons of gas remaining, make a call to request a refill truck visit the station (refillRequest). This will cause the tank to be refilled automatically
AHPA #9:
A Gas Station
• You have been asked to create a C program to manage the gas
pumps at a gas station. The station has four pumps connected
to four tanks with capacities: 100, 75, 50, and 150. Every time
a car fills up it takes 10 gallons. You’ll know that a car has
arrived because the carArrived function will return with a
pump number. After a car has filled up, print out the current
contents of all four tanks.
• Write a C program that can track each of the four tanks. Update
the amount of gas remaining in a tank when a car fills up.
When a tank gets to less than 20 gallons of gas remaining,
make a call to request a refill truck visit the station
(refillRequest). This will cause the tank to be
refilled automatically

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images









