Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83000 石晋骁 打印直角三角形 C++ Compile Error 0 MS 0 KB 199 2024-07-14 08:35:31

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ cin n; cin >> n; for(int i = 1;i <= n;i++){ for(int j = 1;j <= i;j++){ cout << "*"; } cout << endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:6: error: expected ';' before 'n'
  cin n;
      ^
Main.cc:4:7: warning: statement has no effect [-Wunused-value]
  cin n;
       ^
Main.cc:5:9: error: 'n' was not declared in this scope
  cin >> n;
         ^