Define a function RemoveUpper() that takes a string parameter and returns a string. The returned string is the parameter with all characters except the uppercase letters removed.
Ex: RemoveUpper("vbWmVEGrL") returns "vbmr"
Recall string's size() returns the number of characters in a string. Ex: myString.size()
string's at() returns a character at the specified position in the string. Ex: myString.at(3)
isupper() checks if the character passed is uppercase. Ex: isupper('A')
returns a non-zero value. isupper('a')
returns 0.
Code:
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
/* Your code goes here */
int main() {
string input;
string output;
getline(cin, input);
output = RemoveUpper(input);
cout << output << endl;
return 0;
}