Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc
Answer Posted / vaibhav
#include<stdio.h>
#include<conio.h>
void main()
{
int n,t,i,cnt=1;
clrscr();
printf("\nEnter The No.");
scanf("%d",&n);
while(n%10!=0)
{
n=n%10;
t=n/10;
printf("\n %d number= %d",cnt,t);
cnt++;
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is a pointer on a pointer in c programming language?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Explain what are linked list?
What is structure in c language?
What is wrong with this declaration?
What is a macro?
what is the difference between 123 and 0123 in c?
How was c created?
Why is it that not all header files are declared in every C program?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
What does %2f mean in c?
What is the general form of a C program?
How can I read and write comma-delimited text?
How can I make it pause before closing the program output window?
How do I use strcmp?