New problems for quiz #4 in Computer Tools KJC (10/24/99) ------------------------------------------ Note: User friendly prompting for inputs and labeling of outputs (and labeling of units, if appropriate) is required for full credit. Unless explicity stated, use INTEGER or REAL types as appropriate. Here are the three "new" problems for IF... 1) Chapter #3 (pages 172 to 175), problem #5 2) Chapter #3 (pages 172 to 175), problem #6 3) Chapter #3 (pages 172 to 175), problem #8 Here are the three "new" problems for loops... 4) Write a program to output the first 100 positive integers that are not divisible by 3 (i.e., 1, 2, 4, 5, 7, ...). Hint: Remember the modulo function (i.e., MOD(A,B) computes A modulo B). 5) Write a progam that prompts the user to input a postive integer value. The program then outputs a "count down" (e.g., 13, 12, 11, ...) down to 0 starting with the value entered. However, if the value entered is less than 10, or greater than 1000, the countdown should start at 10. Hint: You will need an initial IF (after the input, of course) to test and handle the les than 10 and greater than 1000 conditions. 6) Write a program that prompts the user to input a positive integer value greater than 2 and then outputs all "divide by 2" values until a value less than 1 is achieved. For example, if 47 is input, then the output should be, 23.5000000, 11.7500000, 5.8750000, 2.9375000, 1.4687500, and 0.7343550. Note that 47 / 2.0 is 23.5000000, 23.5000000 / 2.0 is 11.7500000, and so on. Hint: Be careful of mixed mode math "gotcha's". ---