#include<iostream>
#include<bits/stdc++.h>
using namespace std ;
int main(){
int t ;
cin >> t ;
while (t>0)
{
int n ;
cin >> n ;
int fact = 1 ;
for (int i = 1; i <= n; i++)
{
fact = fact * i ;
}
cout << fact << endl ;
t--;
}
return 0 ;
}
There are lots of problems with the code...
int might not be enough for fact... you could go for long.
fact = fact * i; can be written as fact *= i;
Talula
Apk
Alex
Henry
V01D
Vlad
Ammar
ברני
Winkee