In Visual Basic, the Select Case structure performs one of many actions (or sequences of actions), depending on the value of an expression.
(a) Write a program using Select...case block that prompts a user for an exam score. The grade to be dispayed is based on the Table 1 below.
Table 1: Exam Score
Score
Grade
90-100
A
80-89
B
70-79
C
60-69
D
0-59
F
what is dim int
1.The number of times a program or item of data has been accessed is called?
2. To place data into a sequential file using BASIC programming language the ---------statement is used?
3.
CUM Books need a program to calculate a customer’s total book price and the discount given to the customer Accept the customer’s name, type of customer and the discount given. Calculate the total book price bought by the customer based on the customer’s relationship with CUM Books. Assume that the price of one book is R5500 User-interface specifications: Input Specifications: • Accept the customer’s relationship with CUM Books using three radio buttons. The type of customer can be: Regular, Non-regular or Passers-by (Store “R”, “N” or “P” respectively for the type of customer). • Use appropriate controls for the other input value(s). • Provide a button that the user must click to process the data and display the output
Create a program to determine the largest of three numbers entered by a user.
>Declare a variable to store 12 models of a car in a local car dealer.
>Declare a user defined data type to store an student information consisting his name, matric number, test1 score and test2 score.
nAssume that k is declared as an Integer. The loop should iterate until -1 is input.
Do While k <> -1
InputBox(“Enter a number -1 to quit:”, VB6)
Loop
Assume that z has been initialized to 50. The values from 0 to 50 should be totaled.
While (z>=0)
sum = sum + z
Identify and correct the error(s) in the following (you may simply need to add code):
Assume that y and total are declared as Integers
total = 0
Do Until y = -1
Print y
y = InputBox(“Enter a value, value input”)
total = total + y
Loop
Identify and correct the error(s) in the following (you may simply need to add code):
Assume that y and total are declared as Integers
total = 0
Do Until y = -1
Print y
y = InputBox(“Enter a value, value input”)
total = total + y
Loop