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...
- 
An exception occurred when trying to establish endpoint for context: Could not load file or assemblyProblem : When I Open Site in SharePoint I’m getting this error. An exception occurred when trying to establish endpoint for conte...
- 
Day 2 - Console application programs listing 1 // Compute the distance from the Earth to the sun, in inches. using System; ...
 
No comments:
Post a Comment