Lecture # 05 (B) : Lecturer: E-Mail
Lecture # 05 (B) : Lecturer: E-Mail
E-mail: [email protected]
It is a list of instructions specifying a precise description
of a step by step process that terminates after a finite
number of steps for solving an algorithm problem
producing the correct answer in the end.
5. Run and Debug the program - check if you have the desired
output; if not, trace the possible error.
1. The flowchart should flow from top to bottom
Process conditions
DECISION using relational
operators. Used for
trapping and filtering
data.
SAMPLE EXERCISES
Sample 1: Write a program that calculates the sum of two input numbers and
display the result.
Sample 2: Write a program to calculate the area of a circle and display the
result. Use the formula: A=πr2 where Pi is approximately equal to 3.1416.
Sample 3: Write a program that computes the average of three input quizzes,
and then display the result.
Sample 4: Write a program that converts the input Fahrenheit degree into its
Celsius degree equivalent. Use the formula: C= (5/9)*F-32.
Sample 6: Write a program that converts the input Celsius degree into its
equivalent Fahrenheit degree. Use the formula: F= (9/5) * C+32.