Untitled
#include <iostream> #include <string> using namespace std; int main() { //string s; //cin >> s; /*string zhora; s.length(); cout << s.length(); zhora[0] = 'g'; cout << zhora;*/ string p1; int sum = 0; cin >> p1; for ( int i = 0; i < p1.length(); i++) { if (p1[i] == 'f') { sum += 1; } } cout << sum; }