Explore BrainMass

A Program To Calculate Volume Flow Rate

I need writing a program to calculate the volume flow rate in cubic feet per second of water flowing through a pipe of diameter d in inches and a velocity of v feet per second. The formula for the flow rate is given by
Q = area * velocity
Where area= πd² /4 in square feet.

Solution Preview

This program was written in Dev C++. Please check the comments to understand the meaning of each variable.

#include <cstdlib>
#include <iostream>
#include <iomanip>

using namespace std;

int main(int argc, char *argv[])

float v; ...