Hi im having trouble getting the function to return the right values for i and q... heres my code
# include <iostream>
# include <cmath>
# include <iomanip>
# include <fstream>
using namespace std;
double flow_rate (double,double,double,double);
int main ()
{
double Q,k,i,H,L,A,D,D1;
D = 10; L = 200; k = 0.1; H = 50;
cout<<"All raw data D= "<<D<<"L= "<<L<<"k= "<<k<<"H= "<<H<<endl;
cout<<"Calculated values of i= "<<i<<endl;
cout<<"Flowrate Q= "<<Q<<endl;
system("pause");
return 0;
}
double flow_rate (double D,double L,double k,double H)
{
double Q,i,A,D1;
D = 10; L = 200; k = 0.1; H = 50;
D1 = (.3937)*(D);
i = (H / L);
return i;
A = (.785)*((D)*(D));