0

I don't really see a lot of people using variables like I did here. Is there something improper about this?

It's the days to secs challenge https://code.sololearn.com/csSb31Hr4M4e/?ref=app

23rd Apr 2022, 1:23 PM
Topher Langford
Topher Langford - avatar
4 Answers
+ 2
Nothing improper if you already know how many seconds in 24 hours
23rd Apr 2022, 1:55 PM
A͢J
A͢J - avatar
+ 1
Just because you can write it like this: System.out.println (scanner.nextInt() * 86400); does not mean you should. Your code is more understandable than this one.
23rd Apr 2022, 2:20 PM
John Wells
John Wells - avatar
+ 1
//days * 24 hours *60 minutes * 60 Seconds System.out.println (days*24*60*60);
24th Apr 2022, 6:48 PM
Mi-Ⓜ️ohamed
Mi-Ⓜ️ohamed - avatar
+ 1
I don't know why the question is evaluated as negative, guys. Support your friends who are learners of a new language and beginners. Never give a negative evaluation. Encourage him to learn. Learning this language may change his life for the better. He may find a new job. Other than understanding, but I say that he will learn if he finds an incentive to learn and goes deeper into the language. He does not have to learn everything once he has started learning a specific language or a particular course. The most important thing is that he continue learning it and not leave the course as soon as he stops at a simple problem at the beginning of learning. I wish everyone success.
24th Apr 2022, 6:58 PM
Mi-Ⓜ️ohamed
Mi-Ⓜ️ohamed - avatar