Javatpoint.com is changed to TpointTech.com
Factorial program in C#Factorial Program in C#: Factorial of n is the product of all positive descending integers. Factorial of n is denoted by n!. For example: Here, 4! is pronounced as "4 factorial", it is also called "4 bang" or "4 shriek". The factorial is normally used in Combinations and Permutations (mathematics). Let?s see the factorial program in C# using for loop. Output: Enter any Number: 6 Factorial of 6 is: 720 Next TopicArmstrong Number in C# |
Javatpoint.com is now changed to TpointTech.com, so we request you to subscribe our newsletter for further updates.
C# Program to swap two numbers without third variable We can swap two numbers without using third variable. There are two common ways to swap two numbers without using third variable: By + and - By * and / Program 1: Using ∗ and / Let's see a simple C# example...
2 min read
Palindrome program in C# A palindrome number is a number that is same after reverse. For example 121, 34543, 343, 131, 48984 are the palindrome numbers. Palindrome number algorithm Get the number from user Hold the number in temporary variable Reverse the number Compare the temporary number with reversed number If both numbers...
2 min read
program in C# We can write the sum of digits program in C# language by the help of loop and mathematical operation only. algorithm To get sum of each digit by C# program, use the following algorithm: Step 1: Get number by user Step 2: Get the modulus/remainder of...
2 min read
Program in C# Prime number is a number that is greater than 1 and divided by 1 or itself. In other words, prime numbers can't be divided by other numbers than itself or 1. For example 2, 3, 5, 7, 11, 13, 17, 19, 23.... are...
2 min read
in C# In case of fibonacci series, number is the sum of ious two numbers for example 0, 1, 1, 2, 3, 5, 8, 13, 21 etc. The first two numbers of fibonacci series are 0 and 1. Let's see the fibonacci series program in C#. using...
2 min read
C# Program to Print There are different triangles that can be printed. Triangles can be generated by alphabets or numbers. In this C# program, we are going to print alphabet triangles. Let's see the C# example to print alphabet triangle. using System; public class PrintExample ...
2 min read
C# Program to reverse number We can reverse a number in C# using loop and arithmetic operators. In this program, we are getting number as input from the user and reversing that number. Let's see a simple C# example to reverse a given number. using System; public class...
1 min read
C# Program to Convert In C# language, we can easily convert number in characters by the help of loop and switch case. In this program, we are taking input from the user and iterating this number until it is 0. While iteration, we are dividing it...
4 min read
C# Program to print Like alphabet triangle, we can write the C# program to print the number triangle. The number triangle can be printed in different ways. Let's see the C# example to print number triangle. using System; public class PrintExample { ...
2 min read
in C# Before going to write the C# program to check whether the number is Armstrong or not, let's understand what is Armstrong number. Armstrong number is a number that is equal to the sum of cubes of its digits. For example 0, 1, 153, 370, 371...
2 min read
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India