Visual Basic01 Input ProgramsWrite programs which use labels and text boxes to input information and perform the following calculations. Name the programs 01_???_input# where ??? is your 3 initials and # is the program number 1, 2, 3, etc. The first filename using my initials would be 01_jlw_input1. Make the form caption be your name and the program number such as "Your Name - Input # ". Use appropriate variable names and types. In the General - Declarations of your program, use the 'Option Explicit' command. Make sure to use a val() statement to convert any text values to numeric values when appropriate. 1. Write a program that inputs a Fahrenheit temperature and calculates the Celsius temperature. Use a print statement to print the output to the form in a statement similar to 32 degrees Fahrenheit is 0 degrees Celsius. 2. Write a program which will use a text box to input the name of an item, the quantity purchased, and the price of the item. Use labels to clearly note which text box contains what data. Find the cost of the purchase (do not include tax). Display the total cost in a sentence format. 3. Write a program that inputs the number of miles a car travels and the gallons of gasoline used and gives the miles per gallon for the trip. Print the results to the form in sentence format similar to Using 4 gallons of gas travelling 200 miles would be 50 mpg. Unit 1 - Demo 3 - Using Inputboxes and Outputting to a Label Box Note: These videos were inadvertently saved to Demo 4. You can refer to it as either Demo3 or Demo4!
Use inputboxes to input information for each problem. Print the output in sentence format to a label box. 4. Input the length and width of a rectangle. Determine the area and perimeter of the rectangle. Output should be in a form such as "A 3 x 4 inch rectangle has an area of 12 sq in and a perimeter of 14 inches." 5. A coin is flipped repeatedly. Write a program that inputs the number of heads and tails that occurred and outputs the percentage of heads and tails. 6. Write a program that inputs an item name, the store's cost of the item, and percentage profit. Calculate the selling price and amount of profit the store makes on that item.
|
||||||||||||
|
||||||||||||