Untitled
#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; }