Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

e.cpp

#include<iostream>
#include<string>
#include<cstdlib>
using namespace std;
int main()
{
    int say=1;
    string st;
    getline(cin,st);
    for(int i=0;i<st.size();i++) if(st[i]==' ' && isalpha(st[i+1])) say++;
    for(int i=0;i<st.size();i++) if(st[i]==',' && isalpha(st[i+1])) say++;
    cout<<say<<endl;
    return 0;
}
Source by www.eolymp.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
6+3 =