Tutorials  Articles  Notifications  Login  Signup


Small Factorials

Problem statement
You are asked to calculate factorials of some small positive integers.

Input format
An integer t, 1<=t<=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1<=n<=100.

Output format
For each integer n given at input, display a line with the value of n!

Constraints
1<=t<=100 1<=n<=100

Sample Input 1
4
1
2
5
3


Sample output 1
1
2
120
6



Explanation
1! = 1 2! = 2 5! = 120 3! = 6





// Write your code here in C++


Editiorial

N/A



go back Go back to Mathematics



Author: Rajan Shah

Level: Easy

Uploaded on: Nov. 30, 2019

Lab: Mathematics

Section: None


Found something wrong ? Inform us



Other problems from this lab

ETF - Euler Totient Function

Subarray with given sum

Maximum Index

Finding the numbers