Write the visual basic code declare an array to store five


Write the Visual Basic code.

Declare an array to store five values; they could be decimal numbers.

Prompt the user to store values into the array.

Then prompt the user for a value to subtract from each element of the array.

Subtract that value from each element of the array and print the new values. Make sure you actually change the values in the array.

The output should look like this (note that it should work for any values that are input, these are just examples). You must use loop(s) to process the array.

Enter number: 10

Enter number: 20

Enter number: 30

Enter number: 40

Enter number: 50

Enter value to subtract: 5

After subtracting 5 the values are

5

15

25

35

45

Press any key to continue . . .

Solution Preview :

Prepared by a verified Expert
Visual Basic Programming: Write the visual basic code declare an array to store five
Reference No:- TGS01673603

Now Priced at $35 (50% Discount)

Recommended (91%)

Rated (4.3/5)