The problem solving aspect of programming with examples
Problem solving is making efforts to find a solution to a problem.The complexity of a problem is determined by the time taken to solve it.There are problems that have no readymade solution.Such problems are called Open Problems.
The computer is best suited for its repetitive ability and correctness of solutions to problems.Even an ordinary user can use it and get the results,once the program is written for solving a problem.Quite often,problems are not understood correctly.It may be due to the complexity of the problems.Therefore,if a problem could be explained with the help of examples,it would make it easier to understand.
To find the some of the digits in a number,we can divide the problem into 3 parts:
(1) finding the modulus of 10
(2) adding the number to a sum whose initial value is zero
(3) dividing the number by 10 and then repeating the process from (1)again till the quotient is zero