FINDALPHABE - Editorial

PROBLEM LINK:

Practice
Contest

Author: Vidya kale
Tester: Vidya kale
Editorialist: Vidya kale

DIFFICULTY:

CAKEWALK.

PREREQUISITES:

None.

PROBLEM:

Check whether an alphabet is a vowel or consonant.

QUICK EXPLANATION:

Chef give you some alphabets character. Your task is to print whether it is a vowel or consonant.

EXPLANATION:

Check whether an given alphabet is a vowel or consonant ,and print it as output.

SOLUTIONS:

Setter's Solution
   #include <iostream>
   using namespace std;
   int main() 
   {
         char c;
         int t,k;
         cin>>t;
         for(k=0;k<t;k++){
           cin >> c;
           if(c == 'a' || c == 'e' || c =='i' || c=='o' || c=='u' || c=='A'
                  || c=='E' || c=='I' || c=='O' || c=='U'){
                    cout << "Vowel"<<"\n";
           } 
           else {
              cout <<"Consonant"<<"\n";
          }
       } 

      return 0;
   }
Tester's Solution
   #include <iostream>
   using namespace std;
   int main() 
   {
         char c;
         int t,k;
         cin>>t;
         for(k=0;k<t;k++){
           cin >> c;
           if(c == 'a' || c == 'e' || c =='i' || c=='o' || c=='u' || c=='A'
                  || c=='E' || c=='I' || c=='O' || c=='U'){
                    cout << "Vowel"<<"\n";
           } 
           else {
              cout <<"Consonant"<<"\n";
          }
       } 

      return 0;
   }
Editorialist's Solution
   #include <iostream>
   using namespace std;
   int main() 
   {
         char c;
         int t,k;
         cin>>t;
         for(k=0;k<t;k++){
           cin >> c;
           if(c == 'a' || c == 'e' || c =='i' || c=='o' || c=='u' || c=='A'
                  || c=='E' || c=='I' || c=='O' || c=='U'){
                    cout << "Vowel"<<"\n";
           } 
           else {
              cout <<"Consonant"<<"\n";
          }
       } 

      return 0;
   }