Thanks you for clearing that up! Could you give me a hint of which part of the program should I assign what it read so it can be use in the else statement? Thanks
Type: Posts; User: maple1100
Thanks you for clearing that up! Could you give me a hint of which part of the program should I assign what it read so it can be use in the else statement? Thanks
What data type should I read the user input into? If I use Int, it would give me an error when user input a double.
" "Please enter the fibonacci number "- I mean at "What integer would you like to calculate the Fibonacci number for? " - Sorry.
else if(userNum.nextInt() < 0 ) - This is use to compare if the...
I just realize I use the int variable instead of the scanner in the if statement. Thanks you.
--- Update ---
I'm sorry, I marked the thread by accident. Here is what I have so far. Right now,...
I'm trying to see if the user input is an int but the error I'm getting is int cannot be a deference could someone explain to me what does that mean? Thanks
import java.util.Scanner;
public...