Question: 6. Array practice questions - Do this in your project group. Due at next lab class (Feb 17). Question Liquid Delight is a water company

 6. Array practice questions - Do this in your project group.

6. Array practice questions - Do this in your project group. Due at next lab class (Feb 17). Question Liquid Delight is a water company that trucks water to 20 residents in Wasp Hill district in rural Jamaica. There are 4 roads in the entire community and 5 household on each road to truck water to. A single water truck services the entire community. Use four arrays to store the gallons given to each road. road1Gallons[5], road2Gallons[5], road3Gallons[5], road4Gallons[5]. Write a C program that accepts the starting number of gallons of water placed in the truck. The starting quantity is evenly distributed amongst the four roads but not evenly distributed amongst individual household. Each household makes a request for the water from the trucking system, the system checks if the truck has enough water for that road and output to user if they are able to get the gallons requested. Output a message if the resident needs to make a lower request. After each household is given water. A message is reported of the remaining gallons for that road. Place the number of gallons given to each household on a particular road in an array. Track the total number of gallons given to each road. Also track the total gallons given to the entire Wasp hill District. At the end of the day state the totals gallons remaining in the entire truck Report the average gallons used by household per road Find the household that uses the highest number of gallons per road Allow the program to record and report about all 4 roads at any one execution of the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!