REVENG01 - Editorial

PROBLEM LINK:

Practice

Contest

Author: Ankit Kathuria

Tester: Anuj Gupta

Editorialist: Akshat Jain

DIFFICULTY:

SIMPLE

PREREQUISITES:

Interest in Coding

PROBLEM:

Finding the problem is the first task based on the input, output format and exe file provided. Then think the logic and code the same.

QUICK EXPLANATION:

The task in this problem is to count the number of vowels, provided the input contains spaces and also strings after integer are input.

EXPLANATION:

• After having number of test cases as input, each test is to be inputted and processed. Each test case contains a string in which number of vowels is to be calculated. This can be done simply by comparing the string character by character with vowels.

• Things to remember are firstly, it may have both lower and upper case characters. Secondly, in languages such as C++, after inputting the number of test cases (int) string is to be inputted but we have to flush the new line character first. This can be done by using getline after having int as input so as to flush the new line character in buffer.

• Finally, functions such as getline inspite of cin in c++ etc must be used due the presence of blank spaces in string inputs.

AUTHOR’S AND TESTER’S SOLUTIONS:

Author’s solution can be found here.

Tester’s solution can be found here.