Work Sheet 1 - Flow Chart and Pseudocode - Updated Oct 2024
Work Sheet 1 - Flow Chart and Pseudocode - Updated Oct 2024
3. Accepts two numbers and displays the product, sum, and difference of the two numbers.
4. Write an algorithm and draw a flowchart that prints out double of the number.
7. Finds the minimum and maximum numbers from a given list of numbers.
9. Accepts a positive number form the keyboard and displays the value of the following series.
Sum = 1-32 +52 – 72+ … n2
10. Prints out the average value of N prime numbers imputed by user.
11. Write an algorithm and draw a flowchart that will read the two sides of a rectangle and
calculate its area
12. Write algorithm to compute and display area and circumference of circle
13. Write an algorithm and draw a flowchart to convert the length in feet to centimeter.
14. Write an algorithm and draw a flowchart to find the temperature of the day and print "Hot" if
temperature is above 300, "Cool" if temperature is below 200, otherwise "steady".
15. Counts and displays the number of even and odd occurrences in a given list of integers.
16. Converts a mark for a course to its corresponding letter-grade. (You may set your own scale
for the grading)
17. Write an algorithm and draw a flowchart to swap two numbers without using third variable.
18. Write an algorithm and draw a flowchart to find the sum of digits of given number. If for
example the given number is 536, the sum of digits in the number = 5 + 3 + 6 =14
19. Write an algorithm to generate Fibonacci series. The first two digits in the series are 1 and
the rest is computed by adding the preceding two digits. (i.e. 1 1 2 3 5 8 13 . . .)
20. Write an algorithm and draw a flowchart that reads in a positive integer, computes its
factorial and prints the number and its factorial. Factorial of a number is defined as:
22. Write an algorithm and draw a flowchart to compute the weekly average rainfall given the
daily rainfall for four weeks.
23. Write an algorithm and draw a flowchart to determine N student’s final grade that took four
courses and indicate whether it is passing or failing.
24. Write an algorithm and draw a flowchart to compute the roots of a quadratic equation
ax 2 + bx + c = 0 whose solutions are:
− b + b 2 − 4ac − b − b 2 − 4ac
X1 = and X2 =
2a 2a
25. Write an algorithm and draw a flowchart to log in to face book account and email account
separately.
26. Write a C++ program to inter N random values between 0 and 100 and get their mean and the
standard deviation (SD).
27. Write an algorithm and draw a flowchart to read an employee name (NAME), overtime hours
worked (OVERTIME), hours absent (ABSENT) and determine the bonus payment
(PAYMENT).
28. Write an algorithm and draw a flowchart that will take as input the user’s bank account
balance and the type and level of account they have. Based on this information and the
below rate table, determine the interest rate they are receiving.
29. Write a program that will take as input the type of restaurant the user ate at, the cost of the
meal, the number of people in his/her party, and how good the service was. Determine the
dollar amount of the tip:
Base Tip: Diner: 12% Good Restaurant: 15% Fancy Restaurant: 20%
Additions/Subtractions:
• Service type:
(a) Poor Service: -2% (b) Good Service: +0% (c) Excellent Service: +2%
• Number of People:
(a) 1-5 in party: +0% (b) 6-10 in party: +3% (c) more than 10: +5%
30. Write a program that will take the current year and then the person's birth year. And your
program computes the user’s age. Perform this task again if he or she wishes.