Friday, August 21, 2015

10. Computer Programming with flowcharting Technique (page 10)



The problem of 5
You are asked to makes program to present the biggest number from INPUT four level unequal numbers.

Solution
For example the number P, Q, R and S

Logic:
The biggest number is number the always bigger if compared to three other number.

Programming stages and steps:
Confronts P with Q, the winner matched with R and the winner is confronted with S
At Flowchart under this Y (Yes) towards right and N (NO) downwards
Input P, Input Q, Input R and Input S can be summarized to become INPUT P,Q,R,S
When executed (in RUN) will come up ? ( enters input)
Writes numeral 4 by dissociated by sign , ( comma) for example 452 , 317 , 9054 , 22
Then press ENTER


DATA TEST : test your program with this input data
P , Q , R , S
data 1 : 1 , 2 , 3 , 4
data 2 : 1 , 2 , 4 , 3
data 3 : 1 , 3 , 2 , 4
data 4 : 1 , 3 , 4 , 2
data 5 : 1 , 4 , 2 , 3
data 6 : 1 , 4 , 3 , 2
data 7 : 2 , 1 , 3 , 4
data 8 : 2 , 1 , 4 , 3
data 9 : 2 , 3 , 1 , 4
data 10 : 2 , 3 , 4 , 1
data 11 : 2 , 4 , 1 , 3
data 12 : 2 , 4 , 3 , 1
data 13 : 3 , 1 , 2 , 4
data 14 : 3 , 1 , 4 , 2
data 15 : 3 , 2 , 1 , 4
data 16 : 3 , 2 , 4 , 1
data 17 : 3 , 4 , 1 , 2
data 18 : 3 , 4 , 2 , 1
data 19 : 4 , 1 , 2 , 3
data 20 : 4 , 1 , 3 , 2
data 21 : 4 , 2 , 1 , 3
data 22 : 4 , 2 , 3 , 1
data 23 : 4 , 3 , 1 , 2
data 24 : 4 , 3 , 2 , 1
OUTPUT is number 4 ( the biggest number out of the four data)

Hereinafter you input can having kinds of number

Followers

Blog Archive