0
Could someone take a look at my code and let me know what is wrong with it?
I am trying to integrate a few concepts into one program, including utilizing user input with the Scanner class, the if statement, and an else statement. https://code.sololearn.com/cyQX2y1D9JsU/?ref=app
2 odpowiedzi
+ 2
myNum doesn't actually hold the value of the user's input.
You can use myNum.nextInt() for that.
For example:
int x = myNum.nextInt();
if (x >= 0) {
// Do something
}
else {
// Do something
}
+ 1
Wow, gracias vato! Me encanta que otro persona de Mexico esta interesado en el codigo. Soy de California pero mis padres vienen de Mexico. I am very excited to know there are other people from Mexico interested and actively participating in programming! Thanks again, brother!
https://code.sololearn.com/cyQX2y1D9JsU/?ref=app