Concept explainers
Explanation of Solution
Given: The response “tied� should be assumed for the following lines of code:
Dim word As String
word = InputBox(“Word to negate:", "Negatives")
txtOutput.Text = "un" & word
To find: The output produced by the given lines of code.
Dim word As String
word = InputBox(“Word to negate:", "Negatives")
txtOutput.Text = "un" & word
Solution:
In the given lines of code, a variable named “word�, which is of the type, string, is declared. The value is read from the user and assigned to the variable, “word�. The textbox will show the output by concatenating the keyword, “un�, before the entered word. The Input box will ask for the word to negate from the user, and then the textbox will show the output...
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Introduction to Programming Using Visual Basic (10th Edition)
- Q2. Write an algorithm and draw a flow chart to find whether given number is zero or positive or negativearrow_forwardAge Write a program that requests your date of birth as input and tells your age. Hint:Use the DateDiff function with the DateInterval.Year option, and then use an If block tomodify the result. See Fig. 4.23 and the note in Exercise 40.arrow_forwardWrite a program to input name and marks in 5 subjects. Calculate the total and grade. Display name, total, percentage and grade where grade will follow the given criteria. Percentage >95 “Excellent” , from 85 to 94 “Very Good” , from 75 to 84 “Good” from 65 to 74 “Satisfactory” less than <64 “Try again”.arrow_forward
- Write a program that finds the location of a letter of the alphabet input by the user. See Fig. 4.1. [Note: Asc("A") has the value 65.] This problem uses visual basicarrow_forwardThe federal government developed the body mass index (BMI) to determine ideal weights. Body mass index is calculated as 703 times the weight in pounds, divided by the square of the height in inches, and then rounded to the nearest whole number. Write a program that accepts a person’s weight and height as input and gives the person’s body mass index. See Fig. 5.4. NOTE: A BMI of 19 to 25 corresponds to a healthy weight. This question is done in visual basicarrow_forwardQ3\ Design and Write VB program to classify students according to their high school average. The students with average greater than 90 should be added to list labeled “ Oil and Gas Engineering”, students with average more than 84 and less than 90 should be added to list labeled “ Chemical Engineering” and students with average more than 79 and less or equal 84 should be added to list labeled “ Polymer Engineering” ,arrow_forward
- Sort Three Numbers Write a program that requests three different numbers as input and then displays the numbers in order. Use a Procedure named Sort to which the three values are passed ByRef and use a “Swap” procedure similar to the one in Example 3. See Fig. 5.36.arrow_forwardEXERCISE WEEK 7 (USE C++ CODING) Based on the image attached, shows a statement of a program are in the incorrect order. Rearrange the statements so that they prompt the user to input the shape type (rectangle, circle, or cylinder) and the appropriate dimension of the shape. The program then outputs the following information about the shape: For a rectangle, it outputs the area and perimeter; for a circle, it outputs the area and circumference; and for a cylinder, it outputs the volume and surface area. After rearranging the statements, your program should be properly indented.arrow_forwardPlease put comment at each step of the programarrow_forward
- Transcribed Image Text A student took four quizzes in a term and would like to compute their average. He also would like to know what will be the remarks. Follow the range of grades and its equivalent remarks, and then fill-up the table below: 100-95 - Excellent 94-90 – Very Satisfactory 89-85 - Satisfactory 84-80 - Fine 79-75 - Fair 74 and below - Poorarrow_forwardThe body mass index (BMI) is calculated as a person's weight (in pounds) times 720, divided by the square of the person's height (in inches). A BMI in the range 19-25, inclusive, is considered healthy. Write a program that calculates a person's BMI and prints a message mentioning whether they are above, within, or below the healthy range. Your document submission for this assignment should include a copy of the Python Code File, 3 screenshots of the program after it runs successfully, and a 1-page report describing the process and tasks performed in the code.arrow_forwardExercise 1: Ask the user to type a string. Count and display the number of vowels (a,e,i,o,u). Print the string with all the vowels removed. Exercise 2: Cows cost $10 each, sheep cost $1 each and 8 hens can be bought for $1. Write a program which will buy exactly 100 animals for exactly $100 containing all three types (not just 100 sheep!)arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning