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

if a five digit number is input through the keyboard, write
a program to calculate the sum of its digits.
(hint:-use the modulus operator.'%')

Answer Posted / rajrartan singh

#include<stdio.h>
#include<conio.h>
void main();
{
int n,d1,d2,d3,d4,d5,sum;
ptintf("enter the five digit no.");
scanf("d",&n);
s=d1+d2+d3+d4+d5;
getch();
}

Is This Answer Correct ?    4 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the size of enum in c?

1122


What is the use of getchar functions?

1186


What is echo in c programming?

1036


What are the advantages of external class?

1073


Is c easy to learn?

996


When would you use a pointer to a function?

1056


Explain which function in c can be used to append a string to another string?

1096


What does c in a circle mean?

1087


How can I pad a string to a known length?

1040


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2652


How does selection sort work in c?

1050


What are the 5 types of organizational structures?

1085


What is the use of pragma in embedded c?

1063


What do header files do?

1084


What is sorting in c plus plus?

984