#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int r = 0, k = 0, t = 0;
const int N = 50;
char array[N];
cin.getline(array, N);
for (int i = 0; array[i]; i++)
if (array[i] == 'r')
r++;
}
if (array[i] == 'k')
k++;
if (array[i] == 't')
t++;
cout << "r = " << r << endl;
cout << "k = " << k << endl;
cout << "t = " << t << endl;
return 0;
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int r = 0, k = 0, t = 0;
const int N = 50;
char array[N];
cin.getline(array, N);
for (int i = 0; array[i]; i++)
{
if (array[i] == 'r')
{
r++;
}
if (array[i] == 'k')
{
k++;
}
if (array[i] == 't')
{
t++;
}
}
cout << "r = " << r << endl;
cout << "k = " << k << endl;
cout << "t = " << t << endl;
return 0;
}