You are on page 1of 3

Alexandria University

Faculty of Computing & Data Science.


First Year – Fall 2019/2020
Programming 1
By. Ossama Altukhy
Examples

• Draw a flowchart for a program that prints the even numbers


between 100 and 1 in a descending order.

• Draw a flowchart for a program that Reads a number and check


whether it is positive, negative or zero and print its status.

• Draw a flowchart for a program that reads a Celsius degree convert


it to Fahrenheit, and displays the result. The formula for conversion
is as follows:
Fahrenheit = (9/5) * Celsius + 32

• Draw a flowchart for a program that inputs three integers from the
keyboard and prints the sum, average, product, smallest and largest
of these numbers. The screen dialog should appear as follows:

Input three different integers: 13 27 14


Sum is 54
Average is 18
Product is 4914

• Draw a flowchart for a program to Obtain three test scores from a


student. Calculate their average test score and output this value. If
their average score is 75% or more output a message indicating that
they may proceed to the next class. Perform a desk check using the
following: 45, 55, and 75.

• Draw a flowchart that calculates the area of a rectangle whose two


sides are A and B. Test the flowchart to ensure logic is correct by
tracing table, using A=3 and B =5.

• Draw a flowchart for a program that reads number that represents


feet and converts lengths from feet to inches and display the result.
Rule: Length in inches = length in feet * 12.
• Draw a flowchart that reads 3 numbers and displays the smallest

• Draw a flowchart for a program, the program should read the


gender and the age and determines if that person is qualified for
military service or not
o The person is only qualified for the military service if he is a
male and his age is between 18 and 30.
o If the gender is female, so this person is disqualified for military
service.
o If the age is less than 18 or greater than 30 then this person is
disqualified for military service.

What will be the output of the following flowcharts?


1-

2-
Write the output for the following expression:
o 4%(10 + 10) *3 * 2
o 5+32/4%5
o 13-(15/3+3)
o (7 * 5% 3) * 8 + 10
o 3*7-15/(3+2)
o x=3
y=8
z=10
(z!=9&&x>5||y<13)
o a=6
b=12
c=5
(c>=5&&a<8||a>=12)

You might also like