6-9 统计个位数字
题目
https://pintia.cn/problem-sets/14/problems/741
本题要求实现一个函数,可统计任一整数中某个位数出现的次数。例如-21252中,2出现了3次,则该函数应该返回3。
程序样例
1 |
|
关键代码
1 | int Count_Digit ( const int N, const int D ){ |
https://pintia.cn/problem-sets/14/problems/741
本题要求实现一个函数,可统计任一整数中某个位数出现的次数。例如-21252中,2出现了3次,则该函数应该返回3。
1 | #include <stdio.h> |
1 | int Count_Digit ( const int N, const int D ){ |