|
|
C++ Code
//*******Begin For Loop*********
for (exh_v=3.0; exh_v<5.05; exh_v +=0.1){ // vary the exhaust velocity from 3.0 to 5.05
fwt = fuelwt(pwt,exh_v); // run the function to find fuel weight
cout << pwt<<'\t' << exh_v << '\t' << fwt << endl; //print out
} //close loop
pwt=2000; // declare payload as set 2000 to be used in for loop
//*******Begin For Loop*********
for (exh_v=3.0; exh_v<5.05; exh_v +=0.1){ // vary the exhaust velocity from 3.0 to 5.05
fwt = fuelwt(pwt,exh_v); // run the function to find fuel weight
cout << pwt<<'\t' << exh_v << '\t' << fwt << endl; //print out
} //close loop
system("PAUSE"); // pause program to allow time to see results
return 0; // return 0 from main
} // end program and main
Back
|