Hi there,
This afternoon, i have been studying how to read numbers using Scanner as you adviced me. However here I need some help because I can compile it:
merci beaucoup.
import java.util.Scanner;
public class Exercise19
{
public static void main(String [] args){
Scanner QueenOfDaimond = new Scanner(System.in);
System.out.println("Enter firstnum: ");
int fnum = QueenOfDaimond .nextInt();
System.out.println("Firstnum: "+fnum);
Scanner AceOfDiamonds = new Scanner(System.in);
System.out.println("Enter secondnum: ");
int snum = AceOfDiamonds .nextInt();
System.out.println("Secondnum: "+snum);
}
if (fnum is in range) {
if (second num is in range) {
// calculate the ouput
} else {
// print second num not in range }
} else {
// print fnum is not in range}if (fnum is in range) {
if (second num is in range) {
// calculate the ouput
} else {
// print second num not in range
}
} else {
// print fnum is not in range
}
}