include
using namespace std;
int main(){
int t;
cin>>t;
while(t–){
int n;
cin>>n;
int temp=1;
for(int i=n;i>0;i–)
temp=temp*i;
cout<<temp<<endl;
}
return 0;
}
include
using namespace std;
int main(){
int t;
cin>>t;
while(t–){
int n;
cin>>n;
int temp=1;
for(int i=n;i>0;i–)
temp=temp*i;
cout<<temp<<endl;
}
return 0;
}
Instead of single hyphen " - " you use " – " double hyphen
#include<bits/stdc++.h>
using namespace std;int main(){
int t;
cin>>t;
while(t–){
int n;
cin>>n;
int temp=1;
for(int i=1;i<=n;i++){
temp=temp*i;}
cout<<temp<<endl;
}return 0;
}