Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
128102 唐诗阳 打印三角形 C++ Compile Error 0 MS 0 KB 441 2025-08-01 20:20:59

Tests(0/0):


Code:

#include<iostream> #include<cstdio> //scanf()\printf() #include<cstring> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n; cin>>n; for(int i=1;i<n;i++){ for(int j=1;j<=n-i/2;i++) cout<<' '; for(int k=1;k<=i;) cout<<'*'; for(j=1;j<=n-i/2;i++) cout<<' '; } cout<<m; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:14:13: error: 'j' was not declared in this scope
         for(j=1;j<=n-i/2;i++)
             ^
Main.cc:17:11: error: 'm' was not declared in this scope
     cout<