write a program that input four digit number and find how
many 7 that number contains
Answer Posted / ruchi
#include<stdio.h>
#include<conio.h>
int main()
{
int num,n,i=0,p;
printf("\nEnter the number ");
scanf("%d",&num);
while(num>0)
{
n=num%10;
p=num/10;
num=p;
if(n==7)
{
i++;
}
}
printf("\nthe total number of occurence of the digit 7
is %d",i);
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Who wrote stl?
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
Can we use stl in coding interviews?
how to use C++?
Describe the My Computer and My Documents folders; identify the elements that are present in every Window.
What are the symptoms of stl?
What are stl algorithms?
Is string part of stl?
How do you convert stl to steps?
What two types of containers does the stl provide?
Name the different types of stl containers.
How is stl different from c++ standard library?
Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister
What is the stl, standard template library?
When did c++ add stl?