Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
101690 罗子童 打印沙漏 C++ Compile Error 0 MS 0 KB 604 2024-12-15 19:14:38

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:5: error: 'cin' was not declared in this scope
     cin>>n;
     ^
Main.cc:10:13: error: 'cout' was not declared in this scope
             cout<<' ';
             ^
Main.cc:13:17: error: 'cout' was not declared in this scope
                 cout<<"*";
                 ^
Main.cc:15:9: error: 'cout' was not declared in this scope
         cout<