// Converting Airspeed into PSI // Written by Lee Devlin 03-12-11 // filename: airspeedtopressure.cpp // The following formula can be found at // http://en.wikipedia.org/wiki/Airspeed // PSI is substituted for inches of Hg and formula is solved for pressure instead of airspeed #include #include #include using namespace std; int main() { cout << "Airspeed" << " Pressure" << endl; cout << " (KTS)" << " (PSI)" << endl; for(int i=0; i <= 240; i +=10) { float p = 14.7*(pow(.2*(pow(i/661.4788,2))+1,3.5)-1); cout << setw(6)<< i << setw(10) << fixed << setprecision(4) << p << endl; } system("pause"); }