CHAPTER 5 EXERCISES
1. Using a FOR-NEXT loop, write a program to print all the even numbers
beginning with 20 and ending with 40.
2. Write a program that will compute the amount
accumulated if you start with a penny and
double it every day for 30 days. Print the
total for each day.
3. Write a program that will read the following names into an array, then
list them in reverse order. Carol, Chuck, Fred, Jane, John.
4. Write a program, including a DIM statement, to construct a matrix for
9 golfers with 4 games each. Include the capability to select and
print a specific golfer number and a specific game. The scores for
the players are:
5. Write a program containing a user defined function to compute the
sale price for any piece of merchandise when given the original price;
use 20% as the rate of discount.
6. Write a program containing a subroutine to calculate average miles per
gallon.
|