CodeChef Solution

Sum of Digits Test Codechef Solution

You’re given an integer N. Write a program to calculate the sum of all the digits of N. Input The first line contains an integer T, the total number of testcases. Then follow T lines, each line contains an integer N. Output  For each test case, calculate the sum of digits of N, and display it in a new line. Constraints 1 …

Sum of Digits Test Codechef Solution Read More »