Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
4680 | 张文曦 | 13求n的阶乘 | C++ | Compile Error | 0 MS | 0 KB | 170 | 2024-09-07 14:53:15 |
#include<iostream> using namespace std; int main(){ int x=1,n; cin>>n; for(int i=1;i<=n;i++){ n=n*i } cout<<n; return 0; }
Main.cc: In function 'int main()': Main.cc:8:5: error: expected ';' before '}' token } ^ Main.cc:4:9: warning: unused variable 'x' [-Wunused-variable] int x=1,n; ^