0% found this document useful (0 votes)
22 views3 pages

Pseudocodes

The document contains 7 examples of pseudocode for calculating different formulas and averages. The pseudocode covers calculating the average of 3 variables, converting Celsius to Fahrenheit, finding the area of a circle, calculating volume of a sphere, determining average speed, calculating the average of 6 quiz scores, and identifying the greatest and smallest of 3 numbers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

Pseudocodes

The document contains 7 examples of pseudocode for calculating different formulas and averages. The pseudocode covers calculating the average of 3 variables, converting Celsius to Fahrenheit, finding the area of a circle, calculating volume of a sphere, determining average speed, calculating the average of 6 quiz scores, and identifying the greatest and smallest of 3 numbers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

) Answer = (A+B+C)/Y

Start
Initialize all the needed variables.
Read values of A, B, C
Compute for sum of three variables (Sum = A + B + C)
Compute for average of three variables (Answer = sum / Y)
Write value of average
Stop
2.) Convert from Celsius to Fahrenheit. Multiply by 9, then divide by 5, then

Add 32.

Start
Initialize all the needed variables.
Read value of C, P, A,
Prompt the user to enter the number
Compute for the product of Fahrenheit (P= number*9)
Compute for the average of Fahrenheit (A=P/5)
Compute for the sum of the Fahrenheit (F=A+32)
Write values Fahrenheit
Stop
3.) Area of a circle (∏ r 2 )
Start
Initialize all needed variables.
Let pi = 3.14
Read the value of radius
Prompt the user to enter the radius
Compute for the area of the circle (area = pi * radius * radius)
Write the area of the circle
Stop
4.) Volume of Sphere ((4/3)∏r 3 )

START
Initialize all the value
Pi = 3.14149
Read the radius of the sphere, r
Prompt the user to enter the radius of the sphere
Compute for the volume of the sphere, V = (4.0/3.0) * Pi * r3
Write the volume of the sphere,
Stop

5.) Average speed = Distance traveled/Time taken)


Start
Initialize all the value
Read the value Distance traveled, Time taken
Prompt the user to input the distance traveled
Prompt the user to input the time taken
Compute for the average of the speed ( Average speed = Distance traveled/Time taken)
write the average speed
stop
6). Write a pseudo-code for adding the quizzes as given below and identify the
Average of a student for six quizzes.
Scores: q1=50, q2=65, q3=90, q4=40, q5 & q6 = 100.
Start
Initialize the value
Read the value q1, q2, q3, q4, q5, q6
Prompt the use to enter the score q1
Prompt the use to enter the score q2
Prompt the use to enter the score q3
Prompt the use to enter the score q4
Prompt the use to enter the score q5
Prompt the use to enter the score q6
Compute for the sum of the score (sum=q1+q2+q3+q4+q5+q6)
Compute for the average of the score (average=sum/445)
Write the average of the total score
stop
7.) Write the pseudo-code given the following information;
a. Input three numbers (whole number only)
b. Identify the greater number
c. Identify the smaller number

Start
Initialize all needed variables.
num1=0, num2=0, num3=0,
Read num1, num2. num3.
If num1 > num2, num3
Then big = num1
Else if Big = num2.
Else Big = num3
Write BIG

If num1 < num2, num3


Then Small = num1
Else if
Small = num2.
Else
Small = num3
Write small
Stop

You might also like