Program to Find Factorial of Number

In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example: Program:   class Program { static void Main(string[] args) { int num, i, fact = 1; //clrscr(); Console.WriteLine(“\n >>C# PROGRAM TO FIND FACTORIAL OF GIVEN NUMBER <<\n”); Console.Write(“\n […]

Read More

Program to Add two numbers

This is a very basic program to add two number/integer in c#. Example:   class Program { static void Main(string[] args) { int x; int y; int result; Console.Write(“\n Enter the first number to be added: “); x = Convert.ToInt32(Console.ReadLine()); Console.Write(“\n Enter the second number to be added: “); y = Convert.ToInt32(Console.ReadLine()); result = x […]

Read More