Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc
Answer Posted / eranna
#include<stdio.h>
#include<conio.h>
void main()
{
int n,t,cnt=1;
clrscr();
printf("\nEnter The No.");
scanf("%d",&n);
while(n%10!=0)
{
t=n%10;
n=n/10;
printf("\n %d number= %d",cnt,t);
cnt++;
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the right type to use for boolean values in c? Is there a standard type?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
What is nested structure with example?
What is the size of enum in c?
What are structural members?
What is the symbol indicated the c-preprocessor?
Explain how are portions of a program disabled in demo versions?
What is .obj file in c?
Write a program to swap two numbers without using third variable in c?
How do you print only part of a string?
How do you sort filenames in a directory?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
Explain can you assign a different address to an array tag?
What is a newline escape sequence?
Where are local variables stored in c?