java-programming icon indicating copy to clipboard operation
java-programming copied to clipboard

About double year variable

Open diegotco opened this issue 4 years ago • 2 comments

Hello, Angie

Thank you for your course

Why an error occurs when I enter 2,5 years instead of 2.5 years BUT at the same time, 30,500 dollars is ok?

Both variables are "double". Then why I can enter 30,500 dollars but no 2,5 years?

Would be great if you can check my code here at https://repl.it/join/xyryefdd-diegotco

image

Thanks again

diegotco avatar Feb 05 '21 14:02 diegotco

Then, when I enter the 2.5 number, everything is ok

image

Very weird

diegotco avatar Feb 05 '21 14:02 diegotco

PD: My Mac has an admin pass, so I can't install anything, that's why I use repl.it

diegotco avatar Feb 05 '21 14:02 diegotco