Untitled
unknown
c_cpp
2 years ago
391 B
8
Indexable
#include <iostream>
using namespace std;
int main() {
int particularGroup;
cin >> particularGroup;
int studentGroup;
cin >> studentGroup;
int count = 0;
while (studentGroup > 0) {
if (studentGroup % 10 == particularGroup) {
count++;
}
studentGroup /= 10;
}
cout << count << endl;
return 0;
}
Editor is loading...