- This topic has 1 reply, 2 voices, and was last updated 10 years, 6 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Miscellaneous › Others › c programming
Make a program that inputs a number and displays the various digits as follows:
Input number : 1257
Output : 1×1000 + 2×100 + 5×10 + 7×1
its very easy
use following
while(num>10)
{
num1 = num%10;
digit = num1;
num = num/10
digit[] is an array that contains all digits of given number