Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Program to find the sum of digits of a given number until
the sum becomes a single digit

Answer Posted / sohini khan

main()
{int n,p,s=0;
while(n>0)
{
p=n%10;
s=s+p;
n=n/10;
}
printf("%d",s);
getch(),
}

Is This Answer Correct ?    29 Yes 43 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between %d and %i?

1092


What is the difference between #include

and #include “header file”?

1023


Do pointers store the address of value or the actual value of a variable?

1077


Is c easy to learn?

976


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1162


Why do some versions of toupper act strangely if given an upper-case letter?

1076


What is sizeof in c?

1001


What is class and object in c?

1115


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2123


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

1120


What is extern variable in c with example?

988


What are actual arguments?

1083


Can we access the array using a pointer in c language?

1044


What is malloc calloc and realloc in c?

1315


What is substring in c?

1200