I need to create a program that will read a line of text in which the words are separated by spaces and punctuations, and will display it in reverse order. The line of text can also include numbers, but if it does, the displayed reversed text must exlude text with word
The problem is, the instructions say i can use only basic functions from .net library and use of complex functions like - sorting, searching charaters and things like that is strictly forbidden. That means .Contains is not allowed. Can some1 please help me, how to write that using basic functions?
EXAMPLE Galaxy Omega123, strains purple color, due to its remoteness! ---> remoteness! its to due color, purple strains Galaxy
string reverseString = "";
for (int j = separatedLine.Length -1; j >= 0; j--)
{
if (separatedLine[j].Contains('0') || separatedLine[j].Contains('1') || separatedLine[j].Contains('2') || separatedLine[j].Contains('3') || separatedLine[j].Contains('4') || separatedLine[j].Contains('5') || separatedLine[j].Contains('6') || separatedLine[j].Contains('7') || separatedLine[j].Contains('8') || separatedLine[j].Contains('9'))
{
separatedLine[j] = "";
}
else
{
reverseString = reverseString + separatedLine[j];
}
}
return reverseString;