Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double conversion(int knot){
- double mph, minute, formula;
- formula = (6076.0 / 5280.0);
- mph = knot * formula;
- minute = mph / 60.0;
- return minute;
- }
- int main() {
- int userKnots;
- double answer;
- cout << "Enter in knots to convert to miles per minute: ";
- cin >> userKnots;
- answer = conversion(userKnots);
- cout << answer << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement