3rd BUBT Intra-University Programming Problem F

Problem F
Summation of Digits of Number
Input: standard input   Output: standard output
The Problem:
Fahad and Zihad are two brother. Fahad read CSE program. Zihad pass H.S.C and waiting for admission.  Zihad wants to be a electrical engineer. But his father and mother wants that zihad will be a computer scientist. Fahad realize the mater and decide that he will write some interesting program for his brother so that he becomes interest for study computer science. From this point of view he wants to write a program that will take an integer number as input and calculate the sum of its digits as output. 
Input will contain an integer number N (1<=N<=  – 1).
For each input, output the summation of each digit of the number N.
Sample Input
Sample Output
Problem Setter: Mijanur Rahmann, Lecturer, Dept. of CSE

Bangladesh University of Business and Technology (BUBT)

At First you can try to solve this problem if you can’t than see this code & find what’s your problem . If you copy paste this code you could not improve yourself in programming .

Posted by Shipu Ahamed

Leave a Reply