Untitled

 avatar
unknown
plain_text
a year ago
262 B
0
Indexable
#include <iostream>
#include <string>
using namespace std;

int main() 
{
    string s{};
    getline(cin, s);
    
    int y = 0;
    
    for (int i = 0; i < s.length(); i++ ){    if (s[i] == ' '){y++;} }
        
        
        
    
    
  cout << y;
  
}
Leave a Comment