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

What is a char c?

988


Do variables need to be initialized?

986


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

2134


How can I run c program?

1120


What is c system32 taskhostw exe?

972


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

2128


what will be maximum number of comparisons when number of elements are given?

1844


What are global variables and how do you declare them?

1012


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1150


Write programs for String Reversal & Palindrome check

1004


Why is it important to memset a variable, immediately after allocating memory to it ?

1994


Why do we use int main instead of void main in c?

1096


What are the different categories of functions in c?

1077


What is #define size in c?

1111


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

1286