Pleas help me to solve this ............I tried...but now ...I am feeling really tired.,my brain is standstill.....
The question is to find perfect number between 1 to 100.Well,who doesnt know perfect no.is the sum of its factors ,including 1 but not number itself.For eg .6 =1+2+3 is perfect no.
The problem is of finding perfect number from 1 to 100.
I have almost completed it (I assume....
But I am stucked on the last part.
I am checking the totalof factors with original number ..to see its perfect number...
But its not showing the return value....???
Another probelm is of scrolling of the screen fast.
I just dont know the syntax of pausing it..and where in my prog should I use it????
thanks in advance.......Help!!
My code :
int perfect();//funcn prtotype
int perfect ()//funcn defn
for(count=1;count<=100;count++)//nos from 1 to 100
for(counter=1;counter<count-1;counter++) //nos for dividing it with count
if (rem==0)//checking for remainder is 0 ans showing the factors
result=result+counter;//storing the total of factors in result
cout<<"total of factors"<<result;
if(count==result) //problem lies here.......??//
thanks in advance...