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 input is 123 then how to print 100 and 20 and 3 seperately?

Answer Posted / letskools

#include<stdio.h>
#include<conio.h>
void main()
{
int a[5];
int i, j,rem,k=0,x=1;
int num;
printf("enter any number");
scanf("%d",&num);
while(num>0)
{
rem = num % 10;
a[k] = rem * x;
x *= 10;
k++;
num /= 10;
}
for (i = k-1; i >= 0; i--)
{
printf("%d\n"a[i]);
}
getch();
}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If null and 0 are equivalent as null pointer constants, which should I use?

1223


Explain the difference between malloc() and calloc() function?

1057


if p is a string contained in a string?

1851


Give basis knowledge of web designing ...

2020


If errno contains a nonzero number, is there an error?

1377


write a program in c language to print your bio-data on the screen by using functions.

6789


How can I convert a number to a string?

1196


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1259


What are the rules for identifiers in c?

1073


What are the similarities between c and c++?

1073


What is a header file?

1083


explain what are pointers?

1017


i want to know the procedure of qualcomm for getting a job through offcampus

2471


Explain low-order bytes.

1039


What are the types of data types and explain?

1091