How to write a C# Program to swap two numbers without using third variable. C# Program to swap two number using System; namespace CSharpProgram { class Program { static void Main(string args) { Console.WriteLine("Enter first number"); int n1 = int.Parse(Console.ReadLine()); int n2 = int.Parse(Console.ReadLine()); Console.WriteLine("Numbers Before swap n1 = " + n1 + " n2

How to Write a C# program to find the reverse number of a number and C# Code to reverse a number. Example: Input: 123455 Output: 554321 C# Program to reverse a number using System; namespace CSharpProgram { class Program { static void Main(string args) { int n, rev = 0, rem; Console.Write("Enter a number to

How to Write a C# program to find factorial of a number. What is Factorial Number? A factorial number is multiplication of all the smaller and equal numbers of N. where N is a positive number. Example: Find a factorial of 5. Output: 5! = 5*4*3*2*1 = 120 C# program to find the fatcorial number. using

How to write a c# program to check a number is Armstrong number or not. In the below example We will see what is an Armstrong number and how to find the Armstrong number in C#. What is Armstrong Number An Armstrong number is a sum of the cube of each number is equal to

How to find the sum of digit in C#. In the below example another way to find the some of digit in C#. Input sample: 123 Output: 6 Sum of digits program in C# using System; namespace CSharpProgram { class Program { static void Main(string args) { //Define variables int num, sum = 0,

How to write a C# program to find the Fibonacci Series. Fibonacci series in C#. Before dive into code let’s understand what is Fibonacci series and then will move to the logic to solve the Fibonacci problem in C#. What is the Fibonacci Series? Fibonacci series is a sum of two subsequent numbers. The first

How to write a C# program to find prime numbers. What is a prime number? And how to find the prime number between two numbers in C#. At the very first let’s understand what is a prime number? Then will write the code to find prime number in C#. List of C# programs with examples.

How to write C# program to find the Fibonacci series. An example of a C# program for beginners. Step by step C# code to find the Fibonacci series. In this example, We will see how to find the Fibonacci series in c#. Before directly dive into code lets understand the problem what is the Fibonacci

char is a primitive data type in Java. Here in this tutorial, we will see What is the char in Java how can we find ASCII value of a char. Char in Java The Java char is a primitive data type. It is used to declare a type of character variables and a method. In Java

Write a Program which removes duplicate characters from the string. Your program should read a sentence (string) as input from user and return a string removing duplicate characters. Retain the first occurance of the duplicate character. Assume the characters are case – sensitive. Input and Output Format: Input consists of a string with maximum size