class Program
{
static void Main(string[] args)
{ //for storing string value
String str, Revstr = "";
//for counting length of Given string
int length;
//showing message to user
Console.WriteLine("Enter
a string:");
//to allow user to input string
str = Console.ReadLine();
//storing the length of given string
length =
str.Length - 1;
//loops the given string length
while (length >= 0)
{
//performimg a reverse string according to length of given
string
Revstr = Revstr + str[length];
length--;
}
// displaying output to user
Console.WriteLine("Reverse
string is {0}", Revstr);
// to keep window
Console.ReadLine();
}
}
Wednesday, 19 June 2013
String Reverse in C#
Subscribe to:
Post Comments (Atom)
SharePoint tenant opt-out for modern lists is retiring in 2019
We're making some changes to how environments can opt out of modern lists in SharePoint. Starting April 1, 2019, we're going to be...
-
Now In this Article explain How to Get selected Items from the CheckBoxList in comma-separated format and Javascript Validations in Chec...
-
Microsoft Announces "TypeScript" TypeScript is a new script language developed by Microsoft for application-scale JavaScri...
-
Day4-Console application Programs listing 1 // Determine if a value is positive or negative. using System; class PosNeg { publ...
No comments:
Post a Comment