0% found this document useful (0 votes)
40 views1 page

Laboratory Exercise 1

The document provides two problems to draw flowcharts for: 1) A flowchart to find the three largest numbers entered by a user by comparing integers A, B, and C. It reads the inputs, compares B and C, then compares the results to A to print the largest number. 2) A flowchart to display the first 10 even numbers by using a for loop to iterate from 2 to 20, checking if each number i is even using the modulo operator, and printing i if even.

Uploaded by

Irold Sanchez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views1 page

Laboratory Exercise 1

The document provides two problems to draw flowcharts for: 1) A flowchart to find the three largest numbers entered by a user by comparing integers A, B, and C. It reads the inputs, compares B and C, then compares the results to A to print the largest number. 2) A flowchart to display the first 10 even numbers by using a for loop to iterate from 2 to 20, checking if each number i is even using the modulo operator, and printing i if even.

Uploaded by

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

Draw a flowchart based on the following given problems. (2 items x 50 points).

a. Find the largest 3 numbers entered by user.

Start

Read int
A, B, C

No Yes
Is B > C? Is A > B? Is A > C?

Yes No No Yes
Print C

Print B Print A

End

b. Display the first 10 even numbers.

start

For int i = 2;
i <= 20; i++

Is i%2 == 0
No

No
Print i

End

You might also like