New course! Every coder should learn Generative AI!
Try a free lesson+ 8
Has anyone solved "No Zeroes" CCC from the Java Courseโ๏ธ๐ค
I can't pass the Test #2. There is probably a bug bcs the Data Input are the same as in Test #1 but SL expects different answer then in Test #1โ๏ธ๐ค Error: division by zero ๐ 2 Of course, I've reported that bugโผ๏ธ๐
8 Answers
+ 7
Victory: Already Fixedโผ๏ธ๐๐
Input data in Test #2 have been changed from 5 2 to 5 0โผ๏ธ
+ 7
Chris My code works correctly ๐ Check spaces etcโ๏ธ๐
+ 7
Chris
try {
...
System.out.println(num1/num2);
} catch(ArithmeticException aex) {
System.out.println("ะrror: division by zero");
} ...
+ 5
Chris Maybe in your line you have some invisible signโ๏ธ
https://code.sololearn.com/c3yoeduGyExa/?ref=app
+ 2
That was fixed but now it doesn't work for me. My output and expected output are identical but it says it's wrong.
+ 2
I've checked and rewritten it 3 times. The exception for Test 3 works fine, but just the divide by zero. IDK why
+ 2
I swear yours and mine are identical... But when. I copied your line over, it worked. I wonder if there was a bug on my end somehow? That is bizarre.
Anyways, cheers!!
+ 1
lap