https://www.codechef.com/TNP72021/problems/TNP702

PROBLEM LINK: (CodeChef: Practical coding for everyone)

Practice

Author: Setter’s name

Tester: Tester’s name

Editorialist: Editorialist’s name

DIFFICULTY : BEGINNER

PREREQUISITES:

Nill

PROBLEM:

Remove all characters in a string except Alphabet.

QUICK EXPLANATION:

We can find the solution by simply taking the alphabets from the input string.

EXPLANATION:

First, we should get the required input from the user and store the string.

all the characters other than the alphabets are removed from the string and the output string containing only the alphabets is displayed.

SOLUTIONS:

Setter's Solution

#include

using namespace std;

int main() {

string s;

cin>>s;

int i=0;

while(s[i]) {

if(isalpha(s[i]))

cout<<s[i];

i++;

}

cout<<endl;

return 0;

}

Tester's Solution

Same Person

Editorialist's Solution

Same Person