using System;
namespace Learn
{
class Program
{
static void
Main(string[] args)
{
Console.WriteLine("Enter a Number");
int numb =
int.Parse(Console.ReadLine());
int reverse = 0;
while (numb > 0)
{
int rem = numb
% 10;
reverse =
(reverse * 10) + rem;
numb = numb /
10;
}
Console.WriteLine("Reverse number={0}", reverse);
Console.ReadLine();
}
}
}
|
C# | ASP.Net | MVC | SQL Server | jQuery | Java Script | LINQ | SSRS| Web Application | Bootstrap | Kendo
Thursday, 16 October 2014
Reverse a number using C#
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment