Here is source code of the C# Program to Get a Number and Display the Number with its Reverse. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.
* C# Program to Get a Number and Display the Number with its Reverse
static void Main(string args)
int num, reverse = 0;
Console.WriteLine("Enter a Number : ");
num = int.Parse(Console.ReadLine());
while (num != 0)
reverse = reverse * 10;
reverse = reverse + num % 10;
num = num / 10;
Console.WriteLine("Reverse of Entered Number is : "+reverse);
Here is the output of the C# Program:
Enter a Number : 123 Reverse of Entered Number : 321
Sanfoundry Global Education & Learning Series – 1000 C# Programs.