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
4 Respostas
+ 2
Nothing improper if you already know how many seconds in 24 hours
+ 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.
+ 1
//days * 24 hours *60 minutes * 60 Seconds
System.out.println (days*24*60*60);
+ 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.