By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,795 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,795 IT Pros & Developers. It's quick & easy.

what is wrong in my leap year?

P: n/a
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;
}

--

Met vriendelijke groet,

Wen
Jul 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Wen" <We************@hccnet.nl> wrote in message news:br**********@news.cistron.nl...
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

Jul 22 '05 #2

P: n/a

"Wen" <We************@hccnet.nl> wrote in message
news:br**********@news.cistron.nl...
Return jaar % 4 == 0 &&
jaar % 100 != 0 ||
jaar % 400 == 0;


Return can't be capitalized.
Jul 22 '05 #3

P: n/a
Wen
Thanks both of you.
Best Regards
Wen

"Ron Natalie" <ro*@sensor.com> schreef in bericht
news:3f**********************@news.newshosting.com ...

"Wen" <We************@hccnet.nl> wrote in message
news:br**********@news.cistron.nl...
Return jaar % 4 == 0 &&
jaar % 100 != 0 ||
jaar % 400 == 0;


Return can't be capitalized.

Jul 22 '05 #4

P: n/a
On Fri, 12 Dec 2003 20:37:09 +0100, Wen wrote:
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".

Jul 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.