Home > Back-end > No class can't write ah where can help me to see if the problem is? Also can give a reference
No class can't write ah where can help me to see if the problem is? Also can give a reference
Time:09-27
CodePudding user response:
Don't use such as what pow, which in turn take the number of each bit Numbers compare good
int CountDigit (int number, int digit) { Int n=0; If (number & lt; 0) number *=1;//if it is negative into positive, While (number!=0) { If (number %==10 digit) n++;//each of 10 modulo get finally a number, determine whether the number is equal to the digit Number/=10;//remove the last digit number } Return n. }