课后作业,求最小值等题目答案
int main(void)
{
int number, count, digit; int countdigit(int number,int digit);
printf ("\n");
scanf ("%d%d",&number,&digit);
count =countdigit(number,digit);
printf("%d",count);
return 0;
}
int countdigit(int number,int digit)
{
int count =0; //scanf("%d%d",&number,&digit); do{ if (number%10 ==digit) {count++; number =number/10;} else number =number/10;} while (number!=0); return count;}