0 Compile Error

foo.cc: In function 'int main()':
foo.cc:20:16: error: expected ';' before 'return'
     cout<<"  *"
                ^
                ;
     return 0;
     ~~~~~~      

代码

#include <iostream>
using namespace std;
int main()
{
    int k;
    cin>>k;
    for (int i = 1; i <= 3; i++)
    {
        for (int j = 1; j <= 3-i;  j++    )
        {
            cout << " ";
        }
        for ( int p = 1; p <= i*2-1; p++   )
        {
            cout << k;
        }
        cout << endl;
    }
    cout<<endl<<" ***"<<endl;
    cout<<"  *"
    return 0;
}

信息

递交者
题目
DJKS1008  字符菱形
比赛
2024年3月等考一级题单
语言
C++ 98
递交时间
1 年前
评测时间
1 年前
分数
0
总耗时
0ms
峰值内存
0 Bytes