Good or bad?

  • 3
  • Locked
Write the compare(int a) method so that it: - displays "The number is less than 5" if the method argument is less than 5, - otherwise, displays "The number is equal or greater than 5".
You can't complete this task, because you're not signed in.
Comments (9)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Robbie_Robot Student
5 October, 16:41
OMG, that whole spelling must be perfectly letter for letter or fail is slightly annoying. The spelling in a print comment should not be as important as getting the code correct. Silly, dinged 6 tries for something I had correct the very first time. :sigh: :(
Ali_Alshehri
Level 5 , Saudi Arabia
24 April, 04:00
good its work
Marcin
Level 5 , Warszawa, Poland
22 February, 20:35
oh come on! PAY ATTENTION TO YOUR CODE!
Anonymous #10936606
Level 6 , United States of America, United States
12 February, 17:06
This is broken right?
flo
Level 6 , Austria
2 February, 23:45
I have the feeling that a mistake has crept in here. The else should say "The number is greater than 5" but it only accepts "The number is equal or greater than 5". How should you know what's coming in here?
Jonaskinny Java Developer at Sandmedia
27 January, 05:19
This task is broken. The solution correctly calls for >= in the second case, but the question language calls for > whenever its greater or equal to 5. displays "The number is less than 5" if the method argument is less than 5, otherwise, displays "The number is greater than 5". We can only succeed if we output "The number is equal or greater than 5"
Andy
Level 7 , United States of America, United States
29 January, 18:25
I am wondering too.... I had the else if block written for the equal condition and it won't resolve. Was stuck until I came to your suggestion. Thanks, keep doing the good work and yes I agree, the task is broken and they need to have more clarifications for the task requirement as it seems more vague to me.
Igor
Level 5 , Ukraine, Europe
18 February, 18:58
Absolutely
Siyanda Dlamini
Level 7 , Durban, South Africa
26 February, 20:09
Yes this task is broken