You are on page 1of 13

For each of the following problem statements, write the algorithm, draw the flowchart and

write the pseudocode:

A. Problems (Sequence)

1. Draw a flowchart that will accept the length of the base and height of a triangle and print the area.

Use the formula: Area = (base * height) / 2

ALGORITHM:

FLOWCHART:
PSEUDOCODE:

2. Draw a flowchart that accepts dollar value and print the equivalent peso value. The flowchart will
convert dollar to peso having an exchange rate of 1 is to 53.25.

ALGORITHM:

FLOWCHART:

PSEUDOCODE:
3. Draw a flowchart that will convert Fahrenheit to Celsius using the formula:

Celsius = (5/9) * (Fahrenheit – 32) where Fahrenheit is 20.

ALGORITHM:

FLOWCHART:

PSEUDOCODE:

4. Draw a flowchart that reads in three numbers num1, num2, num3 and determine which is the largest.

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

5. Draw a flowchart that reads unit price and quantity. Compute and display the amount by multiplying
unit price and quantity.

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

B. Problems (Selection)

1. Display “IT’S COLD!” if the temperature is less than 20, “IT’S HOT!” is the temperature is greater than
30, “COOL CLIMATE” otherwise.

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

2. Output “Congratulations you PASSED!” if the student’s grade is greater than or equal to 75.
Otherwise, output “Sorry, you failed”

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

3. Accept two integers for variables int1 and int2 respectively and print the integers in lowest to highest.

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

4. Identify whether the inputted number is a positive or negative. Consider 0 as positive.

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

5. Identify whether the inputted number is even or odd.

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

C. Problems (Looping)

1. Output your name 15 times.

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

2. Output all even numbers from 1 to 50.

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

3. Get the average of all integers from 1 to 30 using do-while loop.

ALGORITHM:
FLOWCHART:

PSEUDOCODE:

You might also like