I\'m trying to make a program that converts ft/s to mph. Ihave the following: #i
ID: 3617579 • Letter: I
Question
I'm trying to make a program that converts ft/s to mph. Ihave the following:#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main () { double fts=0, mph; cout<<"ft/s "<<"mph"<<endl; while(fts<=99) { fts=fts+5; mph=fts*(3600/5280); cout<<" "<<fts<<setw(12)<<mph<<endl; } system("pause"); return 0; }
However, I keep getting 0 for all my mph values. Anyideas on how to fix this?
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main () { double fts=0, mph; cout<<"ft/s "<<"mph"<<endl; while(fts<=99) { fts=fts+5; mph=fts*(3600/5280); cout<<" "<<fts<<setw(12)<<mph<<endl; } system("pause"); return 0; }
However, I keep getting 0 for all my mph values. Anyideas on how to fix this? #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main () { double fts=0, mph; cout<<"ft/s "<<"mph"<<endl; while(fts<=99) { fts=fts+5; mph=fts*(3600/5280); cout<<" "<<fts<<setw(12)<<mph<<endl; } system("pause"); return 0; }
However, I keep getting 0 for all my mph values. Anyideas on how to fix this?