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 created stl?
How do I convert a stl file?
What is stl stack?
How does an stl file work?
In what scenario does the Logical file and Physical file being used?
Name the different types of stl containers.
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
Who wrote stl?
How do you convert stl to steps?
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
Explain stl.
How is stl different from c++ standard library?
Is there any error below, its a code to delete all entires from a map #include
how to use C++?
What is stl in oop?