Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

how to making game in c++ ?

2726


What is stl stand for?

1236


What is the stl, standard template library?

1094


sir please send me bpcl previous question papers

2403


what is template and type convertion

2456


What is meant by stl in c++?

1152


What is the use of stl?

1095


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

2091


How do you convert stl to steps?

1160


Explain stl.

1367


What does stl stand for in basketball?

1162


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

2386


Define stl.

1272


How do I convert a stl file?

1110


Who created stl?

1198