Guest User

Untitled

a guest
Feb 11th, 2019
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int n;
  8.     cin >> n;
  9.     cin.ignore();
  10.    
  11.     int sCount=0,
  12.         tCount=0;
  13.    
  14.     for(int i=0; i<n; i++) {
  15.         string s;
  16.         getline(cin, s);
  17.        
  18.         for(int j=0; j<s.length(); j++) {
  19.             if(tolower(s[j]) == 's')
  20.                 sCount++;
  21.             else if(tolower(s[j]) == 't')
  22.                 tCount++;
  23.         }
  24.     }
  25.    
  26.     if(sCount > tCount || sCount == tCount) {
  27.         cout << "French";
  28.     } else {
  29.         cout << "English";
  30.     }
  31.     return 0;
  32. }
Add Comment
Please, Sign In to add comment