Secuence Structure: Steven M. Fernandez 11-CSS-B

You might also like

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

Secuence

Structure

Steven M. Fernandez
11-CSS-B
1.Problem: Draw flowchart that will accept a length value in meters and print its
equivalent length in yards. The conversion units are the following:

1m=100cm 1ft=12in 1in= 2.54cm 1yd = 3ft

START

1m=100cm
1ft=12in 1yd=3ft
1in=2.54cm

Yd=1m/100cm = 2.54cm/1in = 12 in/1ft = 3ft/1yd

Yd

STOP
2. Draw a flowchart that will accept the length of the base and height of a triangle and
print area..

Formula: Area = ½ b*

Start

bh

A = ½ b*h

STOP
3. Draw a flowchart that will accept temperature in Fahrenheit and print its equivalent
temperature Celsius

Formula: C = 5/9 (f-32)

START

( C REF -32)

C = 5/9 (F-32)

STOP
Exercise 2: Sequence Structure

4. Draw a flowchart that will move the data of variable

A= 20 B= 25 C= 30 D= 35 E= 40

Start

E= C

A = 20 B = 25
C = 30 D = 35
E = 40 D=E

B=F STOP

A= B

C= A

B=C

D=B

E= D
5. Given the following variables and values:

A= 20, B= 25 C = 30 and D= 35, make all the values of the variables equal to the value
of variable B.

START

A = 25 B = 25 C= 30

D = 35

B = A = +5

B=B

B = C = -5

B = D = 10

STOP
6. Draw a flowchart that will arrange the values of A,B,C in ascending order where A =
15, B = 10 C = 20… A gets the lowest value and C gets the highest value.

START

A = 15 B = 10
C = 20 D = 0

A=D

B=A

D=B

ABC

STOP
Exercise 3 :

7. Draw a flowchart that will accept a value of radius and compute and print the area of
the circle. Given the formula: where A= 𝜋𝑟 2 𝜋 = 3.1416

START

R=C

A= 𝜋𝑟 2

STOP
8. Make a flowchart that will arrange the values of A,B,C,D in highest to lowest order
where a gets the highest value. And D gets the lowest value where A= 3, B= 9, C= 12,
D= 6.

START

A=3 B=9
C = 12 D = 6

A=E

C=A

D=C

E=D

STOP
9. Draw a flowchart that will accept two integers and print the accepted values.

START

A, B

A, B

START
10.Draw a flowchart that will accept a dollar value and print the equivalent peso value
where

START

$1=45.15

D $

D= D* 45.15 P

STOP
Secuence
Structure

Steven M. Fernandez
11-CSS-B
1 . That will accept two integers. If the integers are equal, print the sum of equal,
otherwise print the product.

start

A=B

A=B SUM 1
T

PRODUCT A=B

PRODUCT

stop
1. That will input unique integers for A,B, and C and print the highest number.

start

A,B,C

A>B A>C A 1

B>C B 1
T

stop
3.That will accept a real state value and compute the real state tax that will meet the following
conduction:
A. If the value of thereal state is lessthan 250,001.00 tax is computed at 5%the real
state value.
B. If te value of the real state is between 250,001.00 and 500,000.00 tax is computed at
10% of the real state value.
C. If the real state is more than 500,000.00 tax is computed at 15% of the real state
vale.

start

REV

REV≤250,001 REV=RET*5%

SUM=A+B

(REV≥250,001 or 1
REV≤500,000)
F

RET=REV*10%

RET=REV*15%

Product=A&B
1
stop
4.That will determine if the input number POSSITIVE or NEGATIVE considered 0 as
POSSITIVE.

start

N≥Ø POSSITIVE 1
T
Ø
F
Type equation here.

NEGAT

IVE
stop
5. That determine if the input number is ODD or EVEN

start

N/2 EVEN 1
T

ODD

Type equation here. 1

stop
6. That determine if the input age is “Qualified To Vote” or not. If Qualified To Vote
otherwise “TOO YOUNG”. We all know that a Qualifying age is 18years old and above

start

AGE

AGE≥18 Qualified 1
T

TOO
YOUNG

stop
7. That will compute for the grade of students and print its equivalent grade point. The
formula for computing the grade is; grade=10% Assign + 20% Seatwork + 30% Quiz +
40% Exam. Note that there are 2 Assignment, 2 Seatwork, and 2 Quizes given.

Equivalent Grade Point


1.00 = 99 – 100 2.25 = 84 - 86
1.25 = 96 – 98 2.5 = 81 - 83
1.5 = 93 – 95 2.75 = 78 - 80
1.75 = 90 – 92 3.00 = 75 - 77
START
2.00 = 87 – 89 5.00 = below 75

Grade = assign+SW+Q+Exam
Assign 1 Assign
2 SW 1 SW 2
Q1 Q2

Grade ≥ 99

Or Grade
Assign = ( assign 1 + assign 2) ≤ 100

SW = (SW 1 + SW 2) 20%
5.0

Q = (Q1 + Q2) 30%


STOP

Exam = Exam 40%


8. An employee’s weekly working hour is 40. If an employee exceeds 40 heours, it is considered
overtime. Create the flowchart that will accept the number of hours worked by employee and
his/her hourly rate and print the gross pay and overtime pay rendered , if theres no OT pay to
print , print only the gross pay. To compute the gross pay of an employee, multiply the hour
worked by his/her hourly rate plus his/her OT pay. OT hours are rendered by employee over40
hour. The overtime hours are rendered should be computed by using 1.50% his/her hourly rate.

START

NHW

NHW≥
OTH = 40 NHW
40

GP = (NHW) +OTP OTP = OTH (HRS


15%)

STOP
9 That will accept vehicle type and kilometers traveled and determine the toll
charge given the following the formula:
*Toll charge = Vehicle Type* km. (based on ticket type)
Toll charge Matrix:

Vehicle Type Charge/km Ticket Type km


 Car P 0.50 1 - Yellow 15
 Light Truck P 0.75 2 - Blue 25
 Bus P 1.00 3 – Red 50
 Heavy Truck P 1.25 4 – orange 75

START

VT=C TC =
TC
0.50*KM

VT=CT TC = 0.75* TC
KM

VT = B TC = 1. TC
00*KM

VT = HT
TC = 1.25* TC
KM

STOP
10 That wil accept a person’s age and print its equivalent education level.The age of a child in
considered 1 year old if it resesarches 6 months to 1year, the flowchart should be able to
identify the child’s education level. If a child was able to finish college it is considered that heis
no longer a child and is already a young adult and a professional. If the educational level is
professional. The flowchat should not print anything. The education level in to age is as follows:
*Age 0-2 Parental
*Age 3-4 Nursery
*Age 5-6 Pre-School
*Age 7-12 Elementary
*Age 13-16 High School
*Age 17-21 College
2

START

Age age > 7or


age <12,

age > 0 Parental


or age
<, 2 age >
13or age
<16,

age > 3
or age Nursery
<,4 age >
17or age
<21,

9.

age > 5 Pre school


or age STOP
<, 6
Iteration
Structure

Steven M. Fernandez
11-CSS-B
1. Produce the following series 2,4,6,8,10… until 1000 th term

START

N<
1000

STOP N N = N*2
3.That will generate and print the following infinite series: 1,2,4,8,16,32…

START

≥1

STOP N*2
N
3.That will generate and print the following series until the 500 th term: 11,22,33,44….

START

N≤500

N
STOP N = N+1
4.That will print the first 1000 counting numbers

START

N≤
1000

STOP N N = N+1
5.That will compute and produce the printed output for the sum of the square of printed
integers for 1 to 100.

a. Let isqr = integer square I = integer

START

i≤10 Isqr=i*i
0 i

Sum = isqr
+ isqr

STOP

Sum
6. To compute the area of a circle starting with r = 1.0 up to r = 50 then print out each
radius and the corresponding area of the circle.Type equation here.

START

r≤
𝐴 = 𝜋𝑟 2
5.00

A
STOP

𝑟 =𝑟+1
7. Given the following prices: 71.00,5.00,9.00,8.00, make a flow chart that will print the
sum of these prices.

START

71.00 5.00
9.00 8.00

P = 71 + 5 + 8 +
9

STOP
8. Which will read and print the names and individual scores of 100 students for a
particular examination also determines their scores and print it out.

START

Name
Score

Count
Name Counters
er ≤
score counter + 1
100

STOP
9. Produce the given sequence numbers 1,2,3,4,5

START

N≤5 N N=N+1

STOP
10.That calculates and Produces 2- Column sequence numbers

START

C.A

C≤5 C C = C +1

STOP

A = A+1

You might also like