494 - Kindergarten Counting Game UVa Solution || UVa 494 - Kindergarten Counting Game Solution in C C++ CPP

Problem name: 494 - Kindergarten Counting Game
Judge: UVa Online Judge
Solution on GitHub: 494 - Kindergarten Counting Game


UVa Online Judge 494 - Kindergarten Counting Game Solution in C/C++/CPP


#include <iostream>

using namespace std;

int main()
{
    string s;
    while (getline(cin, s))
    {
        int len = s.length(), count = 0, total_word = 0;
        for (int i = 0; i < len; i++)
        {
            if (s[i] >= 'A' && s[i] <= 'Z' || s[i] >= 'a' && s[i] <= 'z')
            {
                count = 1;
            }
            else
            {
                total_word += count;
                count = 0;
            }
        }
        cout << total_word << "\n";
    }

    return 0;
}



494 - Kindergarten Counting Game




Tags: 494 - Kindergarten Counting Game UVa Solution, UVa 494 - Kindergarten Counting Game Solution in C C++ CPP, uva 494 solution, uva 494 solution in c, uva 494 solution in c++, uva 494 solution in cpp, uva 494 solution java, uva 494 solution in python, kindergarten counting game uva solution, kindergarten counting game uva solution in c c++ cpp java python javascript, 494 - kindergarten counting game solution, uva 494, kindergarten game coding ninjas, uva online judge, uva online judge down, uva online judge registration, online judge the programming challenges robot judge, online judge coding

Next Post Previous Post
No Comment
Add Comment
comment url