题解 | #计算一个数的阶乘#
计算一个数的阶乘
http://www.nowcoder.com/practice/b0423a89826c4d68a3e8b9832a6a1f49
using namespace std;
int main() {
int n;
cin >> n;
long long factorial = 1;
int i=1;
for(i=1;i<=n;i+=1){
factorial*=i;
}
// write your code here......
cout << factorial << endl;
return 0;
}