Enter a phrase: the quick BROWN FOR JUMPS over the lazy dog.
Output
TE
QK
BN
FX
JS
OR
TE
LY
D.
>Solution :
Try this:
string Sentence = "Hello World";
string[] Words = Sentence.Split(' ');
string Result = "";
for (int i = 0; i < Words.Length; i++)
{
Result += Words[i].Substring(0, 1).ToUpper() + Words[i].Substring(Words[i].Length - 1, 1).ToUpper() + " ";
}
MessageBox.Show(Result);
If my answer is useful, please mark it as accepted, and upvote it.