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 string concatenation in c?

1094


What does a function declared as pascal do differently?

1136


What is the size of array float a(10)?

1144


Describe explain how arrays can be passed to a user defined function

1105


What are the different types of objects used in c?

1034


What is the use of f in c?

982


Explain setjmp()?

1073


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1246


What are pragmas and what are they good for?

1001


What language is windows 1.0 written?

1068


How to explain the final year project as a fresher please answer with sample project

977


What is selection sort in c?

1103


swap 2 numbers without using third variable?

1135


Explain the use of function toupper() with and example code?

1136


When we use void main and int main?

1090