error C2065 undeclared identifier
#include<iostream>usingnamespacestd;intmain(){intyear;boolIsLeapYear;cout<<"Enterthey...
#include <iostream>
using namespace std;
int main()
{
int year;
bool IsLeapYear;
cout<<"Enter the year:";
cin >> year;
IsLeapYear=((year%4==0 && yeah%100!=0) || (year%400==0));
if(IsLeapYear)
cout<<year<<"is a Leap year"<<endl;
else
cout<<year<<"is not a Leap year"<<endl;
}
D:\c++成品\3\3.cpp(9) : error C2065: 'yeah' : undeclared identifier
D:\c++成品\3\3.cpp(15) : warning C4508: 'main' : function should return a value; 'void' return type assumed
执行 cl.exe 时出错.
HELP!!!!!!!!!!!!!!!!!!!!!! 展开
using namespace std;
int main()
{
int year;
bool IsLeapYear;
cout<<"Enter the year:";
cin >> year;
IsLeapYear=((year%4==0 && yeah%100!=0) || (year%400==0));
if(IsLeapYear)
cout<<year<<"is a Leap year"<<endl;
else
cout<<year<<"is not a Leap year"<<endl;
}
D:\c++成品\3\3.cpp(9) : error C2065: 'yeah' : undeclared identifier
D:\c++成品\3\3.cpp(15) : warning C4508: 'main' : function should return a value; 'void' return type assumed
执行 cl.exe 时出错.
HELP!!!!!!!!!!!!!!!!!!!!!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询