Monday, July 2, 2012

Loop: Digit Sum

Assalamu Alaikum. Hope you all are well by the grace of Almighty. Today we learn how to find the sum of digit(s) of an integer. Take a look at the problem.

Problem: A positive integer is entered through the keyboard. Write a program to calculate sum of all the digits of the number.

Solution:



Thank you all..:)

0 comments:

Post a Comment