Flowchart for Topic 4

Please feel free to use these flowcharts on your Google sites. Construct equivalent pseudocode and write a short paragraph describing your algorithm. Each of these can be implemented with for loops (e.g. loop X from 0 to 10) or while loops (e.g. loop while X < 10). See if you can provide both implementations for each of the three flowcharts.

This flowchart sums all of the elements of ARRAY. 

Flowchart_Summing an array

This flowchart counts how many elements in ARRAY are greater than 50.

Flowchart Elements greater than 50

This takes a 7 x 24 = 168 element array corresponding to hours in a week and sums it by 24-hour periods. (It was the same flowchart as used in the recent quiz.)

Flowchart_2D array 168 hours summing by day

This flowchart shows how to convert a one-dimensional array (TEMPS) to a two-dimensional array (NEWTEMPS). Notice that we don’t require nested loops in the pseudocode, because the data structure we are traversing is only one-dimensional.

Flowchart_1d array to 2d array

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s