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...

write a program for input is 56 output will be 5+6=10?

Answer Posted / saranya

#include<stdio.h>
#include<conio.h>
main()
{
int n,a,b=0;
clrscr();
printf("Enter the n value");
scanf("%d",&n);
while(n!=0)
{
a=n%10;
b=b+a;
n=n/10;
}
printf("Result is %d",b);
getch();
}

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept of segmentaion.

2085


Write a nonrecursive routine to reverse a singly linked list in O(N) time.

3547


describe how your code can determine if the user entered an input box value or click the cancel button?

2124


what is mean by tranducer

2106


What are the main differences between the engines in jet fighters and the engines in jet airliners; which type of engine is the more efficient, and (qualitatively) why?

1177


is there any better model than jcb 3dx

2067


how to find out the name of the users who are currently working starting with the same characters in unix os

1803


what is the stucture of.net array?

2079


hai,am a marine engineer..pls anyone tell me what is the abbrevation for "gfca" in Mitsui B&w 7l67gfca engine.my mail id is kamaraj_mech@yahoo.co.in

2040


NIC question paper

2754


what is the difference between error,exception,bug,defect,fault..?

2359


WHAT IS THE PROPER LOCATION OF SAMPLE POINT OF LPG SPHERE TANK?

2377


what is the number of water, sand and cement required for moulding brick?

1363


What is the procedure for taking leave while detecting Epf and Esi?

2174


to acheve the IP 65 protection class does it is mandatory to apply silicon grease?

1871