Program that reads an integer


Write a program that reads an integer between 0 and 10000 by selecting the integer at random; then sum the digits. For example if the number is 7462, use the remainder operator (%) and the division operator (/) to get the individual digits. For example, 7462/1000 = 7 and 7462%1000 = 462; 462/100 = 4 and 462%100 =62; 62/10 = 6; 62%10 = 2. The sum of all its digits is 7+4+6+2=19.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Program that reads an integer
Reference No:- TGS0540185

Expected delivery within 24 Hours