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


Please Help Members By Posting Answers For Below Questions

What are the similarities between c and c++?

605


how to make a scientific calculater ?

1568


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3151


What is a void * in c?

602


Explain Basic concepts of C language?

651






How can you allocate arrays or structures bigger than 64K?

687


What is the best way of making my program efficient?

573


Are negative numbers true in c?

604


Difference between macros and inline functions? Can a function be forced as inline?

716


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

671


What's the total generic pointer type?

619


What are the benefits of c language?

651


Why should I use standard library functions instead of writing my own?

677


What do you mean by a sequential access file?

631


Explain #pragma statements.

607