A computer system, as we've seen, is a group of recommendations that we issue to a computer for it to carry out a task for us. To be able to tell the computer what direction to go, we need to have the basic strategy or actions involved with our mind that would be needed to complete our task.This gives us to the concept of 'reason', which infact is the base and key of every computer program that you produce - however simple or however complicated the program might be. The reason, in simple terms might be viewed as the 'technique' behind the solution of a problem. It's that step( teaching) or set of steps that form the main part of this program and may be the foundation of the issue solving.Consider for instance - choosing the average of 5 numbers insight with a person. What's the initial thought that crosses your mind whenever you think of the solution of this problem? Basic mathematics tells you, we have to increase the numbers and divide them by 5. This very step, which forms the key to the solution of this challenge is infact the 'logic' behind the solution of this task and what our program will be based upon.When we produce a program for the above task, we will
Take the 5 figures from the user

Put them

Split them by 5

Give the result back to the userOut of all these steps, once we may clearly see, probably the most relevant steps on which depends our whole production and the action the program performs are 2 & 3 - dividing them by 5 and adding the 5 figures. If we were to improve these steps, the entire function and conduct of the plan could change.Consider for a time that we substitute steps 2 and 3 by the following:
Take the 5 figures from the user

Take the initial number & keep it in a variable 'SMALLEST'

Take next number

Match up against 'SMALLEST'

If range

Repeat step three to five for all remaining 4 numbers

Provide the consequence stored in 'SMALLEST' back once again to the userWhat would you recognize here? The first and last steps are still exactly the same. What we've changed is the primary or the 'reasoning' of the program i.e. once the user has input the 5 numbers, we have changed what we do with the numbers! And this change now gives us the littlest amount from your 5 numbers input since the result. This thus becomes a program to obtain the smallest amount from a set of given numbers!Having now seen the significance of logic to publish a program, we'd next be looking into the equipment that help us draft out the logic before we make it into a ready computer program.