If input is 123 then how to print 100 and 20 and 3 seperately?
Answer Posted / charusheela
#include<stdio.h>
#include<conio.h>
void main(){
int num=123,r,i=1;
clrscr();
while(num)
{
r=num%10;
printf("%d\n",r*i);
i*=10;
num/=10;
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Ow can I insert or delete a line (or record) in the middle of a file?
What is a good way to implement complex numbers in c?
What is the process of writing the null pointer?
Explain what are the different file extensions involved when programming in c?
How can I implement sets or arrays of bits?
What is the difference between break and continue?
How can you check to see whether a symbol is defined?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
Why is it that not all header files are declared in every C program?
What is the sizeof () operator?
Tell me is null always defined as 0(zero)?
What is difference between structure and union with example?
What is the explanation for prototype function in c?
How can I open files mentioned on the command line, and parse option flags?
how to introdu5ce my self in serco