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

Work Sheet 1 - Flow Chart and Pseudocode - Updated Oct 2024

The document outlines a worksheet for students at Addis Ababa Science and Technology University, focusing on algorithms, flowcharts, and pseudocode. It presents a series of programming problems that require students to analyze, create algorithms, and visualize solutions through flowcharts. The problems cover a range of topics including mathematical operations, series calculations, data validation, and user input handling.

Uploaded by

nogev24665
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)
35 views3 pages

Work Sheet 1 - Flow Chart and Pseudocode - Updated Oct 2024

The document outlines a worksheet for students at Addis Ababa Science and Technology University, focusing on algorithms, flowcharts, and pseudocode. It presents a series of programming problems that require students to analyze, create algorithms, and visualize solutions through flowcharts. The problems cover a range of topics including mathematical operations, series calculations, data validation, and user input handling.

Uploaded by

nogev24665
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

Addis Ababa Science and Technology University

College of Electrical and Mechanical Engineering


Department of Software Engineering
----------------------------------------------------------------------------------------------------------------------

Work Sheet 1 - Algorithms


Flow chart and Pseudo code
(Instruction): - First, Analyze the problem, then prepare algorithm (pseudocode
and flowcharts) to solve the following problems.
1. Finds the minimum and maximum of two given numbers.

2. Check if a number received from the keyboard is divisible by 5 or not.

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.

5. Write an algorithm to find the smallest number from three numbers.

6. Find the smallest among N numbers.

7. Finds the minimum and maximum numbers from a given list of numbers.

8. Find the sum of first N even 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.

Fundamentals of Programming I Page 1


Addis Ababa Science and Technology University
College of Electrical and Mechanical Engineering
Department of Software Engineering
----------------------------------------------------------------------------------------------------------------------

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:

n!= n(n − 1)(n − 2)...(2)(1) and 0! = 1 Note: include data validation.

21. Write an algorithm and draw a flowchart to find Armstrong number.

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

Note: include all necessary data validation.

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).

Fundamentals of Programming I Page 2


Addis Ababa Science and Technology University
College of Electrical and Mechanical Engineering
Department of Software Engineering
----------------------------------------------------------------------------------------------------------------------

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.

Designing your own problem:


1. Write your own problem that is not the same with any of the above and prepare algorithm
pseudo code, and flowchart of the problem

Fundamentals of Programming I Page 3

You might also like