Hi to all
I have a quick question. How can go through the integer to find if there is any specific number. For example my input would be 234446 (integer is of type long),and now I would like to check that integer and find how many 4's are in there and then display it.
Appreciate it

Thank for reply
but it don't work, try yourself, I'm sending you piece of code. No matter what numbers you pick, it is just not right (or maybe its me)

#include<iostream.h>
#include<conio.h>
using namespace std;
int main()
{
long n;
int found5,found8;
long digit;
found5=0;
found8=0;
cout<<"Enter an integer: ";
cin>>n;
while(n>0)
{
n=n/10;
digit=n%10;
if(digit==5)
found5++;
else
if (digit==8)
found8++;
}
cout<<"We have: "<<found5<<" 5's and we have: "<<found8<<" 8's";
getch();
return 0;
}

Doing it that way skips the single's digit if the number is found there as you are dividing the number by 10 before you modulus by 10 on the first iteration and check for 4.

Example: 3334 on the first iteration would be:
3334/10
333%10

check:
if( 3 == 4) false;
counter does not update, remains 0;

I am looking for log archival utility or approach which should be able to help me in based on below policy.
(1) whenever log file (system.log) size >30859 or file ...

Good day community,
I have completed vb.net program (a school timetabling program) and I am in the process to create a website. At the moment word -press on wamp server ...