View Code of Problem 445

#include <iostream>
#include <string>

using namespace std;

int main()
{
	int t;
	while (cin >> t) {
		string s[20];
		for (int i = 0; i < t; ++i) {
			cin >> s[i];
			for (int j = 0; j < s[i].size(); ++j)
				if (s[i][j] >= '0' && s[i][j] <= '9') {
					s[i].erase(j, 1);
					--j;
				}
					
		}
		for (int i = 0; i < t; ++i)
			cout << s[i] << endl;
	}

	return 0;
}

Double click to view unformatted code.


Back to problem 445