answersLogoWhite

0

//This function reverse any given string, except null

static string Reverse(string s) {

char[] temp = s.ToCharArray();

Array.Reverse(temp);

return new string(temp);

}

//The main usage

string inputString = Console.ReadLine();

Console.WriteLine(Reverse(inputString));

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

How do you create a menu editor in visual basic 6.0?

Men editor is a most important feacture of any application that enables a large number of commands in a small area. Visual basic provides to creating menu editor in our application. The following step is used to create a menu editor in visual basic 6.0-Click on the 'Tools' menu of VB application window.Select menu Editor from this.A dialogue box is appear. Here we named the menu, named its caption select shortcut for the menu.After doing this click on ok to create your menu.Then after from your menu we select it to write code or event to it for perform a specific operation


C code programming to reverse a number?

/*The coding style used in this source code is for convenience. * It is widely used style of coding. */ #include <stdio.h> void main() { int number, modulus, reverse; reverse = 0; printf("Enter a number \n"); scanf("%d", &number); while(number != 0) { modulus = number % 10; reverse = (reverse * 10) + modulus; number =number / 10; } printf("The reversed number is %d", reverse); getch(); }


Application of Emerson class number?

How do you calculate Emerson class numbers


How do you write the pseudo code for an application that accepts a number as input and displays the value that is one more than the number?

input number print number + 1


Java script program to Print the Fibonacci series using array?

<script type = "text/javascript"> var input; var rev = 0; input=window.prompt ("Please enter a 5-digit number to be reversed."); input = input * 1; while (input > 0) { rev *= 10; rev += input % 10; input /= 10; } document.write ("Reversed number: " + rev); </script>

Related Questions

How do you write pseudocode for reverse of given number?

To write pseudocode for reversing a given number, first initialize a variable to store the reversed number and set it to zero. Then, use a loop to extract the last digit of the number (using modulo operation), append it to the reversed number, and update the original number (by dividing it by 10). Continue this process until the original number becomes zero. Finally, output the reversed number. Here’s a simple pseudocode example: function reverseNumber(number): reversed = 0 while number > 0: digit = number % 10 reversed = reversed * 10 + digit number = number // 10 return reversed


How is 5 a palindromic number?

A number is said to be palindromic when it remains the same when it is reversed. 5 reversed is 5 itself.


What five digits number when you multiply by four is the same the number when you reversed it?

five digits number when you multiply by four is the same the number when you reversed it is 21978*4 = 87912


Is XBOX the number game console?

well, there is a debate over it. no console is number 1.


How many 2 digits numbers are such that the difference of the number and the number with the digits reversed is a perfect square?

If the number with the digits reversed can have a leading 0 so that it is a 1-digit number, then 16. Otherwise 13.


Is 19 reversed a prime number?

No, 91 is composite.


What is the four digit number whose digits are reversed when multiplied by nine?

Find a four digit number whose digits will be reversed when multiplied by nine?


I am 13 My coach is 31 which is my age with the digits reversed What is the fewest number of years in which the digits of our ages will be reversed again?

after 11yrs.


You are 13My coach is 31 which is your age with the digits reversed What is the fewest number of years in which the digits of your ages will be reversed again?

11yrs.


If the units digit and the hundreds digit of the number 513 were reversed find the sum of the original number and the new number?

"If the units digit and the hundreds digit of the number 513 were reversed..." 315 'find the sum of the original number and the new number." 513+315=828


What is the application locator number for your passport?

The application locator number for your passport is a unique identification number assigned to your passport application. It helps track the status of your application.


How do you send people messages on the Wii?

get their number of the wii console or or as i recognized that if you have their number of the wii console and the other doesn't and if you have an email just send on your email and first go 'send to' and write a 'w' and then their wii console number and then @wii.com.