Flowchart 1 6

21
1. START Hello user! This program will help you determine the smallest value among the five inputted integer. Please enter fi ve inte ers a. Read a Read b b. Read c c. Read d d. Read e e. A

Transcript of Flowchart 1 6

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 1/21

1.

START

Hello user!This program will help you determine the smallest value

among the five inputted integer.

Please enter

five inte ers

a.

Read a

Read b

b.

Read c

c.

Read d

d.

Read e

e.

A

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 2/21

 

A

Is a<b &&

a<c &&a<d &&

a<e?

The

smallest

integeris a.

Is b<a &&

b<c &&

b<d &&

b<e?

Is c<b &&c<a &&

c<d &&

c<e?

Is d<b &&

d<c &&

d<a &&

d<e?

Is e<b &&

e<c &&

e<d &&

e<a?

The

smallest

integer

is b.

Thesmallest

integer

is c.

The

smallest

integer

is d.

The

smallest

integer

is e.

END

YES

YES

YES

YES

YES

NO

NO

NO

NO

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 3/21

2.

START

Hello user!

This program will compute the grade of a student.

Please enter

ma or exam

Read a

Please enter

lon exams

a.

b.

Read b

Read c

A

Calculate average long

exam

The average of your

long exams is “G” 

A

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 4/21

 

Please enter

short uizzes

a.

b.

Read d

Read e

A

c.

Read f 

Calculate average short

quizzes

The average of your

short quizzes is “g” 

B

Calculate gradeC

B

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 5/21

 

B

Is D>=75?

YOU FAILED!

YOU PASSED!!

END

YES

NO

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 6/21

 

A

START

G=(b+c)/2

END

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 7/21

 

B

START

g=(d+e+f)/2

END

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 8/21

 

C

START

D=(.40*a)+(.30*G)+(.30

*g) 

END

Your grade is “D” 

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 9/21

3.

START

Hello user!

This program will compute the total salary of a worker plus bonus

Please enter

salar rate

Read a

A

Please enter # of hours of 

work

Read b

Is b>45?

Is

40<b<=45?

Is

35<b<=40?

Your bonus is

P500

Your bonus is

P250

Your bonus is

P150

Is b<35?

You don’t have

an bonus

B

C=500

C=150

C=250

YES

NO

YES

NO

YES

NO

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 10/21

 

A B

C=0

Calculate salary

Your initial salary is “s” 

Calculate salary

Your total salary is “t” 

B

A

END

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 11/21

 

A

START

s= a*b 

END

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 12/21

 

B

START

t= (a*b)+c 

END

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 13/21

4.

START

Hello user!This program will compute the bonus of the worker with regars to the

number of years in service. 

Please enter

salar rate

Read a

A

Please enter # of years in

service

Read b

Is b==1?

Is 1<b<=5?

Is

5<b<=10?

C=.10*a

C=.20*a

C=.50*a

Is b>11?

C=.75*a

YES

NO

YES

NO

YES

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 14/21

 

A

Your bonus is

“c” 

END

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 15/21

5.

START

Hello user!This program will help you determine the highest and lowest

value among the five inputted integer.

Please enter

five inte ers

a.

Read a

Read b

b.

Read c

c.

Read d

d.

Read e

e.

A

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 16/21

 A

Find the smallest

Find the highest

The highest value is “high”

and the lowest value is “low”. 

A

B

END

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 17/21

 

Is a<b &&

a<c &&

a<d &&

a<e?

Low=a

Is b<a &&

b<c &&

b<d &&

b<e?

Is c<b &&

c<a &&

c<d &&

c<e?

Is d<b &&

d<c &&

d<a &&

d<e?

Is e<b &&

e<c &&

e<d &&

e<a?

Low=b

Low=c.

Low=d.

Low=e.

END

YES

YES

YES

YES

YES

NO

NO

NO

NO

A

START

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 18/21

 

Is a>b &&

a>c &&

a>d &&

a>e?

high=a

Is b>a &&

b>c &&

b>d &&

b>e?

Is c>b &&

c>a &&

c>d &&

c>e?

Is d>b &&

d> &&

d>a &&

d>e?

Is e>b &&

e>c &&

e>d &&

e>a?

high=b

high=c.

high=d.

high=e.

END

YES

YES

YES

YES

YES

NO

NO

NO

NO

B

START

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 19/21

6.

START

Hello user!This program will help you determine the highest and lowest

value among the three inputted integer.

Please enter

three inte ers

a.

Read a

Read b

b.

Read c

c.

Find the smallest

Find the highest

The highest value is “high”

and the lowest value is “low”. 

A

B

END

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 20/21

 

Is a<b &&

a<c &&

a<d &&

a<e?

Low=a

Is b<a &&

b<c &&

b<d &&

b<e?

Is c<b &&

c<a &&

c<d &&

c<e?

Low=b

Low=c.

YES

YES

YES

NO

NO

A

START

END

8/4/2019 Flowchart 1 6

http://slidepdf.com/reader/full/flowchart-1-6 21/21

 

END

Is a>b &&

a>c &&

a>d &&

a>e?

high=a

Is b>a &&

b>c &&

b>d &&

b>e?

Is c>b &&

c>a &&

c>d &&

c>e?

hig=b

high=c.

YES

YES

YES

NO

NO

B

START