0% found this document useful (0 votes)
273 views2 pages

Flowcharting and Trace Tables

This document provides 10 exercises for drawing flowcharts and completing trace tables: 1) Generate the first 15 Fibonacci numbers 2) Draw a flowchart to update a checking account balance with deposits and withdrawals applying service charges if the balance drops below thresholds 3) Draw a flowchart to calculate the cost of a newspaper advertisement based on word count and per-word rates 4) Complete a trace table for a given flowchart 5) Draw flowcharts to calculate the sum of cubes from 1 to 10, with and without including 10 6) Draw a flowchart to calculate a salesperson's gross monthly pay based on sales thresholds and commission rates 7) Draw and test a flowchart to determine if a number

Uploaded by

Abu Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
273 views2 pages

Flowcharting and Trace Tables

This document provides 10 exercises for drawing flowcharts and completing trace tables: 1) Generate the first 15 Fibonacci numbers 2) Draw a flowchart to update a checking account balance with deposits and withdrawals applying service charges if the balance drops below thresholds 3) Draw a flowchart to calculate the cost of a newspaper advertisement based on word count and per-word rates 4) Complete a trace table for a given flowchart 5) Draw flowcharts to calculate the sum of cubes from 1 to 10, with and without including 10 6) Draw a flowchart to calculate a salesperson's gross monthly pay based on sales thresholds and commission rates 7) Draw and test a flowchart to determine if a number

Uploaded by

Abu Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Exercises for Flowcharting and Trace Tables

1. Give the first 15 Fibonacci numbers.


2. Draw a flowchart to update the balance of your chequing account. Input the amount of the cheque or
the deposit. If the balance drops below $200 there is a $0.50 service charge. If the balance drops
below zero there is a $5 charge and an overdrawn account message is given.
3. Draw a flowchart to calculate the cost of an advertisement in the newspaper. Twenty words cost
$5.00 and each extra word costs $0.15.
4. Trace the following flowchart using a neat table.

5. Do a trace for each of the following. Assume I starts as 1 and sum starts as 0.

6. a) Draw a flowchart to find the sum of all the cubes from one up to but not including 10.
b) Show by flowchart how you would change your program to include 10.
7. Draw a flowchart to calculate a salesman's gross monthly pay. For sales up to $1000 he is paid $100
in salary. For his sales from $1000 up to and including $2500 he is paid 15%. For any sales greater
than $2500 he obtains 18%. The input is the salesman's sales for the month.
8. Draw a flowchart to determine whether a number is a multiple of five. Test this with trace tables
using the values 15, 17 and -20.
9. Draw a flowchart to find the larger of two numbers. Call them X and Y. It is not known which is the
larger when you start. Test your flowchart (by using a trace table) with 8 and 3. Also test with 2 and
9. Finally check it with 7 and 7.
10. Draw a flowchart to find the largest of three numbers. Call them X, Y and Z. They could enter in any
order so all possibilities must be considered. None of them is equal. Test by using
X
9
9
4
2
4
2

Y
4
2
9
9
2
4

Z
2
4
2
4
9
9

You might also like