Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- setlocale(0,"");
- string st;
- cout<<"введи строку - St"<<endl;
- getline(cin, st);
- int n = st.length();
- int k1 = 0, k2 = 0;
- for (int i = 0; i < n; i++)
- {
- if (st[i]=='a')
- k1++;
- if (st[i]=='e')
- k2++;
- }
- if(k1>k2)
- cout<<"a>e";
- else if(k2>k1)
- cout<<"a<e";
- else cout<<"a=e";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement