Write an algorithm that asks the user to enter a positive integer (validate if the integer is positive example 624). The program calculates and displays on screen the sum of digits of the number. Example: the sum of the digits of the number 624 is 12 (result of the addition of 6 + 2 + 4)
1
Expert's answer
2017-01-10T09:36:14-0500
using System; namespace Rextester { public class Program { public static void Main(string[] args) { int integer = -1; string input = ""; while (integer < 0){
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments