Untitled
Anonymous
c_cpp
10/07/2023 8:49 AM
524 B
17
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...