Computer Science, asked by poojayadav65324, 7 months ago

WAP and DAF to input a number and print the sum of its digit.

Question Of Class 8 ​

Answers

Answered by simranjagtap1978
1

Answer:

The program output is also shown below

•Cprogram to accept an integer & find the sum of its digits

long num,temp, digit,sum =0;

print (enter the number \n");

scan (%ld",&num);

temp=number ;

while (number≥0)

digit =number%10;

sum =sum +digit;

Similar questions