Answer:
Following are the error in the given program are explain in the explanation part .
Explanation:
The main() function call the function getMileage() function after that the control moves to the getMileage() definition of function. In this firstly declared the "mileage" variable after that it taking the input and module is finished we see that the "mileage" variable is local variable i,e it is declared inside the " Module getMileage() " and we prints in the main module that are not possible to correct these we used two technique.
Technique 1: Declared the mileage variable as the global variable that is accessible anywhere in the program.
Technique 2: We print the value of "mileage" inside the Module getMileage() in the program .
Answer:
True
Explanation:
I would say True but I don't really know a Explanation. but if they have education then they must know more so they get paid more.
Answer:
Create one label and one textbox, and name them quatity, both of them. Now add another label, and name it Price. And add a button, and name it calcprice. Also add state textbox for state. Add a textbox and name it state
Now Double click calcprice button in design mode, and add in calcprice_click, code given below:
If Convert.ToInt32(quantity.Text) <50 and (state.Text != Connecticut or state.Text !=Massachusetts) Then
Price= Convert.ToInt32(quantity.Text) x 2.25
If Convert.ToInt32(quantity.Text) <50 and (state.Text == Connecticut or state.Text ==Massachusetts) Then
Price.Text= Convert.ToInt32(quantity.Text) x 2.25 +20
ElseIf Convert.ToInt32(quantity.Text) >=50 and (state.Text != Connecticut or state.Text !=Massachusetts) Then
Price.Text= Convert.ToInt32(quantity.Text) x 1.50
Else
Price.Text= Convert.ToInt32(quantity.Text) x 1.5 +20
End If
Please add this code and it should work fine.
Explanation:
Please check the answer section.