answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

main()

{

int n,s=0,sum=0,i,d;

printf("enter the number");

scanf("%d",&n);

while(n>0)

{

d=n%10;

s=s+d;

n=n/10;

}

while(s>0)

{

i=s%10;

sum=sum+i;

s=s/10;

}

printf("%d",sum);

getch();

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How do you divide single digits with 3 digits?

by using decimals


What are single digits of 924?

1234679


What are single numbers called?

Digits.


Do you round single digits?

If necessary.


What is the literacy rate of Mesopotamia?

No one is 100% sure, but rates were probably in the single digits. Some experts say in the low single digits.


What single digits has 4 factors?

9


How many digits do ones have?

The ones column are in single digits and if there are none then the 0 digit is used.


Is 24815 divisible of 9?

No. To check for divisibility by 9 add the digits of the number and if the sum is divisible by 9 then the original number is also divisible by 9, otherwise it is not. For 24815: 2 + 4 + 8 + 1 + 5 = 20 which is not divisible by 9, so 24815 is not divisible by 9. Note that the test can be applied to the sum: repeatedly summing the digits of the sum of the digits until a single digit remains means the original number is divisible by 9 only if this single digit is 9, otherwise it is not (instead it gives you the remainder when the original number is divided by 9). This single digit is known as the digital root of the number.


Single program Uni-programming?

A single program is also known as uni programming. Uni programming only allows on program to be present in the memory at a time. Single program


What are single numbers 0-9 called?

Digits


How do you define digit?

A digit is a single number. For example: 0 to 9 are single digits.


What is in digits?

There is nothing "in" digits. Digits are single characters representing the ten integers from 0 to 9 (inclusive).