what is wrong in my leap year?

W

Wen

Hi everyone,
I don't know what I have done wrong in my codes. Could someone take a look
in my bool function
TI@!
#include <iostream>
#include <string>
using namespace std;
bool isSchrikkeljaar (int jaar);

int main()
{
int jaar= 2003;
int y = isSchrikkeljaar (jaar);
cout<< y;
}

bool isSchrikkeljaar (int jaar)
{
Return jaar % 4 == 0 &&
jaar % 100 != 0 ||
jaar % 400 == 0;
}
 
D

David White

Wen said:
Hi everyone,
I don't know what I have done wrong in my codes. Could someone take a look
in my bool function
TI@!
#include <iostream>
#include <string>
using namespace std;
bool isSchrikkeljaar (int jaar);

int main()
{
int jaar= 2003;
int y = isSchrikkeljaar (jaar);
cout<< y;
}

bool isSchrikkeljaar (int jaar)
{
Return

return

Must be lower case.
jaar % 4 == 0 &&
jaar % 100 != 0 ||
jaar % 400 == 0;
}

DW
 
S

Simon Saunders

Hi everyone,
I don't know what I have done wrong in my codes. Could someone take a look
in my bool function
TI@!
#include <iostream>
#include <string>
using namespace std;
bool isSchrikkeljaar (int jaar);

int main()
{
int jaar= 2003;
int y = isSchrikkeljaar (jaar);
cout<< y;
}

bool isSchrikkeljaar (int jaar)
{
Return jaar % 4 == 0 &&
jaar % 100 != 0 ||
jaar % 400 == 0;
}

The only problem I can see is that the "Return" should be "return".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top