初级的输入输出问题,求解答

为什末无法运行啊(vscode)

#include
using namespace std;
int main()
{
int year,month,i,j;
int a[7]={1,3,5,7,8,10,12};
int b[4]={4,6,9,11};

cin >> year;

cin >>month;
if(year%4==0&&year%100!=0){
    if(month==2){cout<<"29";}

}
for (i=0;i<7;i++){
    if(month==a[i])
        cout<<"31";
}
for (j=0;j<4;j++){
    if(month==a[j])
        cout<<"30";
}
if(month==2)
    cout<<"29";

}

头文件没写全

#include <iostream>

写成这样就OK了
有用记得采纳呐

把源代码贴出来,帮你看看