angiejones / java-programming

Course exercises and answers to independent exercises
103 stars 126 forks source link

About double year variable #7

Open diegotco opened 3 years ago

diegotco commented 3 years ago

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 commented 3 years ago

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

image

Very weird

diegotco commented 3 years ago

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