题解 1151: C语言训练-计算一个整数N的阶乘

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

计算一个整数N的阶乘C++版

```cpp#include/*这里也可以用万能头,看看自己的喜爱:#include#include//这里Windows.h不能使用,不然会错*/usingnamespacestd;intmain(){intn;//定义一个整数nlonglongsum=1;//定义sum(n的阶乘),

计算一个整数N的阶乘

摘要:设置变量sum#include<iostream> using namespace std; int main() {     int N,sum = 1;     cin >> N;  ……