Computer Lab Week 7 - For and While Loops


Home


Question 1

Write a Basic program based on the pseudo code developed for Question 1 in Tutorial week 7 (Times table).

Question 2

Write a Basic program based on the pseudo code developed for Question 2 in Tutorial week 7 (total marks).

Question 3

Problem Description

Modify the above program so that a user inputs -1 to indicate that they have finished inputting marks.

Example Runs

Run
Mark (0 to 100 or -1 to Exit) ? 80
Mark (0 to 100 or -1 to Exit) ? 60
Mark (0 to 100 or -1 to Exit) ? 45
Mark (0 to 100 or -1 to Exit) ? 95
Mark (0 to 100 or -1 to Exit) ? -1

Total marks = 280
Run
Mark (0 to 100 or -1 to Exit) ? -1

Total marks = 0

Written by Tim Whitfort.