Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Answer / eranna kybarshi
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,t,cnt=0;
int num[10];
clrscr();
printf("\nEnter The No.");
scanf("%d",&n);
while(n%10!=0)
{
t=n%10;
num[cnt]=t;
n=n/10;
cnt++;
}
num[cnt]='\0';
for(i=cnt-1;i>-1;i--)
printf("\n %d number= %d",cnt-i,num[i]);
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vignesh1988i
sorry ... i could not understand ur question
properly....... can you post it again.... if
possible!!!!!!!!!!!!please
Is This Answer Correct ? | 0 Yes | 1 No |
WAP – represent a char in binary format
How many bytes is a struct in c?
5) Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.without using big int and exponential function
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
say the following declaration is correct nr not. int b=a,n=0;
main() { int a = 65; printf(“%d %o %x”,a,a,a); } Output 65 101 41 Please explain me.How it is coming like that?
What are qualifiers and modifiers c?
write a program in c language that uses function to locate and return the smallest and largest integers in an array,number and their position in the array. it should also find and return the range of the numbers , that is , the difference between the largest number and the smallest.
What is the difference between class and object in c?
show how link list can be used to repersent the following polynomial i) 5x+2
C passes By value or By reference?
5 Answers Geometric Software, Infosys,
What is the value of a[3] if integer a[] = {5,4,3,2,1}?