Albert Dagal

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Computer Programming 1 Prelim Exam

Test I. Fill in the blanks.


Instruction: Supply the missing elements in the flowcharts below. Be sure to number your
answers correctly.

A. This flowchart converts an input dollar amount to its peso equivalent. The conversion
rate is 1 dollar = 48.38 pesos.

START

INPUT dollar

1.Peso = dollar/
48.38

OUTPUT 2. Pesos

STOP

B. This flowchart converts 30 degrees celsius to its equivalent in fahrenheit.


Formula: f = 𝑐+32

START

3. Input

OUTPUT fah

STOP
C. This flowchart accepts 3 grades. If the average of the grades is within 75 to 100, display
“PASSED”, otherwise display “FAILED”.

START

INPUT g1, g2, g3

4. Ave=g1 + g2 + g3

F (ave=>75 and T
5. ave<=100)
a
OUTPUT “FAILED” v OUTPUT 6.“PASSED”

STOP

Test II. Flowcharting.


(This test item is optional. If you omit this, it will not affect your total score.)

Optional (if you omit this item, it will not affect your overall score):
The area of a rectangle is the rectangle’s length times its width. Design a flowchart that asks for
the length and width of two rectangles. If the areas are the same, the flowchart should display
“The areas are the same”, otherwise the area of the rectangle that is the greater of the two is
displayed.
Start

INPUT I1, w1, 12,


W2

Areal= 11 * w1
Area2 = 12 * w2

OUTPUT
Area1=area2 Area1>a area1
rea2

OUTPUT
area2
OUTPUT “The areas are the
same”

end

You might also like