I wrote the following below but I got 2/3 checks passed and I'm not sure why I didn't get 3/3 checks passed. Does anyone have any insight as to why?
int last digit;
lastDigit = number % 10;
Java coffee
Level 4
Why did only 2/3 pass for the modulo task?
Under discussion
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Thomas
5 March, 16:13
Maybe because of: Use a single statement to declare and initialize lastDigit.
As far as I can see you're using two statements.
+2
Java coffee QA Automation Engineer
9 March, 16:44
Ah yes I missed that, thanks Thomas. I was scratching my head wondering why lol.
+1
Thomas
9 March, 18:01
Hahaha, yes, that happened to me all the time. Each time I made a mental note to read the description better and still - I missed something.
+1