This week's book giveaways are in the Angular and TypeScript and Web Services forums.
We're giving away four copies each of Programming with Types and The Design of Web APIs and have the authors on-line!
See this thread and this one for details.
Win a copy of Programming with Types this week in the Angular and TypeScript forum
or The Design of Web APIs in the Web Services forum!

Dan Red

Greenhorn
+ Follow
since Dec 23, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
1
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dan Red

Okay.

The mistake was that the program had to point out the least number, and it was pointing out the greatest number.

Instead of

first > second
return  first

should be

first > second
return second
6 days ago
My code:

It prints that greatest is 3, where it should be 7, where did I went wrong?
1 week ago

Junilu Lacar wrote:

Dan Red wrote:That works, thank you everyone.


Do you mean works, i.e., produces correct results, or "works," i.e., it runs without blowing up?

From what I can tell, least(8, 7) will return 8. I would have thought that the result should be 7.



lol I just noticed that it doesn't produce correct result, gonna edit.
1 week ago
Okay I understand now



That works, thank you everyone.
1 week ago

Knute Snortum wrote:What errors do you get from the code above?  Copy and paste the entire error message here.



Console is blank, but there is error by 18 line "This method must return a result of type int".

Adrian Grabowski wrote:Regarding your error, your method needs to return an int in every scenario



But it is returning at the lines 20 and 23.
1 week ago
My code:



I tried doing exercise 44(14.3) on MOOC https://materiaalit.github.io/2013-oo-programming/part1/week-3/

This is my code so far, I tried from many different ways but that only end up with errors.

halp
1 week ago
This is my code so far:


I have exercise 39.1 (one of the last on the bottom of the site) https://materiaalit.github.io/2013-oo-programming/part1/week-2/

I have error at line 13 that says that star cannot be resolved to a variable. Anyone can help to do that exercise or give link to place where I can find answers for all MOOC exercises?
4 weeks ago