Console Application-Reverse the given number.

public void Main()
{
      int num = 0;
      int i = 0;
      Console.WriteLine("Enter the Number for Reverse:=>");
      num = Console.ReadLine();
      while ((num > 0)) {
            i = (num % 10);
            Console.WriteLine(i);
            num /= 10;
      }
      Console.ReadLine();
}


Ebook Download
View all
Learn
View all