You are on page 1of 1

Exercise 1

Instructions:
Create a flowchart that will arrange the values of A, B and C in ascending order where; Variable A
gets the lowest value and Variable C gets the highest value. The values of the variables are: A = 15,
B = 10 and C = 20. Use a variable Temp as your temporary variable in this flowchart.

Analysis:
The problem in this learning exercise has a simple rule. Arrange the data in ascending order. It also
has a clear direction on where to save the arranged values. We also have to understand that the
value of C has the highest value, and logically variable C will not be included in the swapping
process.

Exercise 2

Instructions:
Print the first five even numbers where: ctr = 0.

Analysis:
We know that the first five even numbers are the numbers 2, 4, 6, 8 and 10. The problem requires
printing these even numbers. If we look closer to the first five even numbers, we will notice that there
is an increment of 2 from each number. To implement the increment in the program, the counter
function should use 2 as incrementing step to produce the even numbers.

You might also like