Monday, 30 September 2024

Word reversing without any build in features in C#

 Console.WriteLine("Enter Word reversing: ");

string s1=Console.ReadLine();

string s2= string.Empty; 

for (int i = s1.Length -1; i > -1; i--)

{

    s2 += s1[i].ToString();

}

Console.WriteLine(s2);

OUTPUT



No comments:

Post a Comment