Program to convert kts to mph
Moderator: S2k Moderators
Forum rules
The posts in this forum are NOT official forecasts and should not be used as such. They are just the opinion of the poster and may or may not be backed by sound meteorological data. They are NOT endorsed by any professional institution or STORM2K. For official information, please refer to products from the National Hurricane Center and National Weather Service.
- JamesFromMaine2
- Category 4
- Posts: 989
- Joined: Tue Jul 19, 2005 1:38 am
- Location: Portland Maine USA
- Contact:
Program to convert kts to mph
Heres a small simple program I wrote in C++ to convert kts to MPH. When it asks you for windspeed in kts put in the wind speed then press enter and it will tell you the wind speed in MPH. heres the download link http://www.yourfilelink.com/get.php?fid=14855
0 likes
-
- Professional-Met
- Posts: 11430
- Age: 35
- Joined: Sat Dec 24, 2005 9:00 pm
- Location: School: Florida State University (Tallahassee, FL) Home: St. Petersburg, Florida
- Contact:
- JamesFromMaine2
- Category 4
- Posts: 989
- Joined: Tue Jul 19, 2005 1:38 am
- Location: Portland Maine USA
- Contact:
- Tampa Bay Hurricane
- Category 5
- Posts: 5597
- Age: 37
- Joined: Fri Jul 22, 2005 7:54 pm
- Location: St. Petersburg, FL
- JamesFromMaine2
- Category 4
- Posts: 989
- Joined: Tue Jul 19, 2005 1:38 am
- Location: Portland Maine USA
- Contact:
yeah I am just learning how to program in diffrent languages. I am trying to work up to be able to program PC games mostly MMORPGs. So far I have taught my self html which even though its not a language to develop programs it is still a computer language. then I taught my self Jave script which is another internet language and then I know some python, C, C++, Java, and Lua. but most of them I am still just learning and I don't know them well enough to really do anything with them yet. however I am working on them! lol
0 likes
- WindRunner
- Category 5
- Posts: 5806
- Age: 34
- Joined: Fri Jul 29, 2005 8:07 pm
- Location: Warrenton, VA, but Albany, NY for school
- Contact:
How about a recon parser? Java could do that fairly easily, and I've actually thought about that several times . . . I might get around to it this summer when I have some time.
And not bad for some basic C++, it's been forever since I used that . . . and now I'm much more proficient with Java anyways.
And not bad for some basic C++, it's been forever since I used that . . . and now I'm much more proficient with Java anyways.
0 likes
- senorpepr
- Military Met/Moderator
- Posts: 12542
- Age: 43
- Joined: Fri Aug 22, 2003 9:22 pm
- Location: Mackenbach, Germany
- Contact:
Here's another tip of advance. Don't convert at all if you don't need to. Think of speeds in knots or in mph, but not both. Think of temperatures in °C or in °F, but not both. Think of pressure in millibars or in inches of mercury, but not both. That proved very successful while I lived in Europe. When I dealt with American items, I used ounces and used liters for European iteam. While driving, I thought of distances and speeds in kilometers rather than converting to miles.
0 likes
- CentralFlGal
- S2K Supporter
- Posts: 573
- Joined: Mon May 16, 2005 9:32 pm
- Location: Cocoa Beach, FL
Re: Program to convert kts to mph
JamesFromMaine2 wrote:Heres a small simple program I wrote in C++ to convert kts to MPH. When it asks you for windspeed in kts put in the wind speed then press enter and it will tell you the wind speed in MPH. heres the download link http://www.yourfilelink.com/get.php?fid=14855
James, from one budding coder to another - looks great! I recognize and applaud the effort you put into this.
You asked for suggestions on the program, I'd add a space after kts for readability, and "mph" after the answer for the user. Possibly even a description/name of the program to appear in the title bar. I'm all about fluffy perks.
Without access to the source code to see if you attempted error handling, I'd add it to ensure numeric input by the user. I'd also add a module to release the memory and exit from within the program.
Self-taught? This is excellent. I've taken C++, VB and Java courses for my MIS degree, though I'm not sure which is my favorite yet. VB does look purty, uses relatively less typing time with it's happy and friendly GUI, and eventually when I have the time I'll head to the store and pick up some .NET material.
MMORPGs? ::perks up:: We *must* talk... up for a study group?

0 likes
senorpepr wrote:Here's another tip of advance. Don't convert at all if you don't need to. Think of speeds in knots or in mph, but not both. Think of temperatures in °C or in °F, but not both. Think of pressure in millibars or in inches of mercury, but not both. That proved very successful while I lived in Europe. When I dealt with American items, I used ounces and used liters for European iteam. While driving, I thought of distances and speeds in kilometers rather than converting to miles.
Yes that works very well, especially for driving. I have to say though that when I was living in Antwerpen I got to where I was automatically converting in my head between franks (BEF) and guilders and US$ (this was before the euro), even marks, when I visited Germany. But what was funny was, I was converting the marks in my head to BEF, to figure out the cost, not US$!
0 likes