One Comment

  1. #include
    #include
    using namespace std;
    int main() {
    char s[250];
    cin.get(s, 250);
    s[0]=s[0]+’A’-‘a’;
    for(int i=0;i<strlen(s);i++)
    {
    if (s[i] != ' ' && s[i – 1] == ' ' || s[i] != ' ' && s[i + 1] == ' ')
    s[i]=s[i]+'A'-'a';
    }
    s[strlen(s)-1]=s[strlen(s)-1]+'A'-'a';
    cout<<s;

    }

    Alta varianta 🙂

    2

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *