Friday, August 21, 2015

7. Computer Programming with flowcharting Technique (page 7)



5.4. B With data INPUT

5.4.1. Find the biggest number

Example:problem 3
You are asked to find the biggest number from two unequal numbers
For example first number of A (numeric) and second number of B (numeric)

Solution:
Applies INPUT A for first number and INPUT B for second number.
If A > B hence printed (PRINT) be A. The statement is PRINT A
If B > A hence printed (PRINT) be B. The statement is PRINT B
In the problem of this answer may not be other.

At this flowchart simply statement END (line number 60) be not in end number.
No problem, because of course it is the logic.

When this program implemented (executed = in RUN) hence will come up ? (input A asks filled by number). Types is just for example number 9 then press ENTER
Came up again? Fills in value B for example 127 then ENTER
Hence will come the result is number 127 as biggest number.
Program can be implemented by input other number.
Save (this program record by the name "SOAL3")

TEST DATA:
First: INPUT A is filled by number 1, and INPUT B is filled by number 2
Second: INPUT A is filled by number 2, and INPUT B is filled by number 1
OUTPUT is number 2 (the biggest number from two the data)
Hereinafter you can input with any number.

Followers

Blog Archive