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

Labuguen - Activity 2 Algorithm and Pseudo Code

The document provides algorithms and pseudocode for two mathematical formulas: (1) converting temperature from Fahrenheit to Celsius and (2) calculating the area of a triangle. For each formula, it lists the steps, provides pseudocode, and includes a flowchart illustrating the process. The document was created by Ivier Tristan M. Labuguen for a computer programming course.

Uploaded by

richmondconde123
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)
26 views2 pages

Labuguen - Activity 2 Algorithm and Pseudo Code

The document provides algorithms and pseudocode for two mathematical formulas: (1) converting temperature from Fahrenheit to Celsius and (2) calculating the area of a triangle. For each formula, it lists the steps, provides pseudocode, and includes a flowchart illustrating the process. The document was created by Ivier Tristan M. Labuguen for a computer programming course.

Uploaded by

richmondconde123
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/ 2

Name: Ivier Tristan M.

Labuguen
Course/Section: CPE 102A-ME22S1

1. Convert Temperature from Fahrenheit (℉) to Celsius (℃)


Formula: C = 5/9 x (F-32)

ALGORITHM PSEUDOCODE

Steps: BEGIN
Start INPUT
Read F F
Calculate cel = 5/9 x (F-32)
a. Cel = 5/9 x (F-32) print “cel”
print “cel” END
Stop

FLOWCHART

Start

Read the temperature as F

Cel = 5/9 x (F-32)

Print “Cel”

Stop
2. Find the area of triangle
Formula:
Area = sqrt(s*(s-a)*(s-b)*(s-c))
Where s = (a+b+c)/2

ALGORITHM

Steps:
Start
Read a, b ,c
Calculate s = (a + b +c)/2
Calculate area = sqrt(s*(s-a)*(s-b)*(s-c))
Print “Area of Triangle=”, area
END

FLOWCHART

Start A

Read the 3 numbers as a, b, c Print “area”

S = (a+b+c)/2
Stop

area = sqrt(s*(s-a)*(s-b)*(s-c))

“I AFFIRM THAT I SHALL NOT GIVE OR


RECEIVED ANY UNAUTHORIZED HELP ON THIS
A ACTIVITY AND THAT THIS WORK IS MY OWN.”

You might also like