Tech Study

Write C# program to reverse a number


I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability..

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class csharpExercise
    static void Main(string[] args)
        int num, rev = 0;
        // Reading number
        Console.Write("Enter any number: ");
        num = Convert.ToInt32(Console.ReadLine());
        //finding reverse number using while loop
        while (num > 0)
            rev = rev * 10;
            rev = rev + num % 10;
            num = num / 10;
        Console.Write("Reversed number is = "+ rev);


Write C# program to reverse a number
Write C# program to reverse a number

TaggedWrite C# program to reverse a number

Java Final keyword

Introduction : java final keyword The final keyword present in Java programming language is generally used for restricting the user. …

Read more

C++ Memory Management: new and delete

C++ Memory Management We know that arrays store contiguous and the same type of memory blocks, so memory is allocated …

Read more