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
How does an stl file work?
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
help me i need a c++ program which takes sequesnce of characters and outputed sequence of their token taypes, work same compiler in lexical analysis phase
What is stl in c++ with example?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
What are stl algorithms?
When did c++ add stl?
What is the stl, standard template library?
what is template and type convertion
In what scenario does the Logical file and Physical file being used?
Can we use stl in coding interviews?
Who wrote stl?
To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command
What is meant by stl in c++?
What are the various types of stl containers?