Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Calculate a test data of this algortihm The owners of a mall need to know when a

ID: 3883977 • Letter: C

Question

Calculate a test data of this algortihm

The owners of a mall need to know when a parking lot will flood based on the rate rainfall. This lot is has one sewer drain. Develop a process that will take the ask the user the size of the lot in square feet, the rain fall in inches per hour, the flow rate of the sewer in feet per second, and the cross section of the sewer pipe in square feet. When the amount of water accumulating by the rain is greater than the amount that can be removed by the drain output a message that the lot should be evacuated, otherwise output a message that the cars are safe.

Explanation / Answer

#include<iostream>

using namespace std;

int main(){

   float rain_fall;
   float area;
   float drain;
   float ar_pipe;
   float fill_rate;

   cout << "Enter rainfall (inches per hour) :" << endl;
   cin >> rain_fall;
   cout << "Enter area of parking lot (sq feet) :" << endl;
   cin >> area;
   cout << "Enter drain rate (feet/sec) :" << endl;
   cin >> drain;
   cout << "Enter cross section area of sewer pipe (sq feet) :" << endl;
   cin >> ar_pipe;

   rain_fall = (rain_fall*0.0833)/3600;
   float total_rain_in = rain_fall * area;
   if (total_rain_in > ar_pipe * drain)
       cout << "Evacuate lot" << endl;
   else
       cout << "Cars are safe" << endl;
      
   
   return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote