write a program that input four digit number and find how
many 7 that number contains
Answer Posted / vitthal kadam
#include<iostream.h>
int main ()
{
int num,cnt,temp;
char ch;
cout<< "Enter any number in between [0-99999]: ";
cin >> num;
temp = num;
cnt = 0;
while (temp)
{
if (temp%10 == 7)
cnt++;
temp = temp/10;
}
cout<<"count of 7 in the entered number is " << cnt ;
cin>>ch;
return 0;
}
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
how to making game in c++ ?
What is stl stand for?
What is the stl, standard template library?
sir please send me bpcl previous question papers
what is template and type convertion
What is meant by stl in c++?
What is the use of stl?
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
How do you convert stl to steps?
Explain stl.
What does stl stand for in basketball?
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
Define stl.
How do I convert a stl file?
Who created stl?