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 are the similarities between c and c++?
how to make a scientific calculater ?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
What is a void * in c?
Explain Basic concepts of C language?
How can you allocate arrays or structures bigger than 64K?
What is the best way of making my program efficient?
Are negative numbers true in c?
Difference between macros and inline functions? Can a function be forced as inline?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
What's the total generic pointer type?
What are the benefits of c language?
Why should I use standard library functions instead of writing my own?
What do you mean by a sequential access file?
Explain #pragma statements.