Program to find out sum of digits of given number with example
Answers
Answered by
4
1+2=3
❣❣HOPE IT HELPS U❣❣
❣❣PLEASE MARK MY ANSWER AS BRAINLILIST ❣❣
❣❣THANKS ❣❣
☺☺☺
❣❣HOPE IT HELPS U❣❣
❣❣PLEASE MARK MY ANSWER AS BRAINLILIST ❣❣
❣❣THANKS ❣❣
☺☺☺
LuvKapoorr:
kaar diya follow
Answered by
1
* C program to accept an integer & find the sum of its digits.
long num, temp, digit, sum = 0;
printf("Enter the number \n");
scanf("%ld", &num);
temp = num;
while (num > 0)
digit = num % 10;
sum = sum + digit;
long num, temp, digit, sum = 0;
printf("Enter the number \n");
scanf("%ld", &num);
temp = num;
while (num > 0)
digit = num % 10;
sum = sum + digit;
Similar questions