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

input any 4 digit number and find the difference of all the
digits?

Answer Posted / nitin garg

int j,num,rem,diff=0;
printf("
Enter Digit
");
scanf("%d",&num);

while(num!=0)
{
rem=num%10;
j=rem+rem;
diff=diff-rem;
num=num/10;
}
diff=diff+j;
printf("
Difference of Digit is : %d",diff);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write the test cases for checking a variable having value in range -10.0 to +10.0?

2321


In c programming language, how many parameters can be passed to a function ?

1115


what is reason of your company position's in india no. 1.

2341


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

1118


How can you invoke another program from within a C program?

1076


How can I read and write comma-delimited text?

1077


What is the purpose of sprintf?

1141


What is sizeof int?

1108


How can you check to see whether a symbol is defined?

1104


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

2187


How can I convert a number to a string?

1199


How #define works?

1113


What are header files? What are their uses?

1220


Who developed c language?

1100


What is a structure in c language. how to initialise a structure in c?

1067