Hands-On Exercise 3

Create a QBasic Program that allows you to convert 3 separate units of measurement from the English System to the Metric System.

The initial screen on your computer should show these 3 options first.

Screen 1:

1.  Inches to Centimeter
2.  Pounds to Kilograms
3.  Miles to Kilometers

What do you want to convert?  <Accept the number for the User's Choice, if the choice is invalid, display an error message and exit the program)

 Screen 2:
<Clear the screen and ask for a positive number as input.  Convert this number into a value within the chosen unit.>
<Display the converted value and unit and then go back to screen 1 to ask for another choice.>

If the user enters an invalid number (negative), display an error message and terminate the program.
As long as the number used as input is a positive number, convert the number, print the value and unit, and loop back to screen 1.

You can make use of the IF-THEN--ENDIF statements and the WHILE-WEND statements.

Download this file template and complete your QBasic Program for Hands-On Exercise 3.  Remember to save your finished QBasic program under a new filename with your name, grade, and section. 
Ex.  Convert_6A1  or  Convert_6A35

Inform your teacher once you are done and have your work checked.

File Size: 0 kb
File Type: bas
Download File