我需要知道爲什麼我在第18-21行發現這個錯誤。我感覺這可能是一個支架相關的問題,但我無法弄清楚。「非法表達開始」菜鳥錯誤?
import java.util.Scanner;
public class Proj4_1 {
public static void main(String [] args) {
Scanner reader = new Scanner(System.in);
int numb1 =;
int numb2 =;
int div =;
int remainder =;
System.out.println("Enter a number: ");
numb1 = reader.nextint();
System.out.print(numb1);
System.out.println("Enter another number: ");
numb2 = reader.nextint();
System.out.print(numb2);
if (numb1>numb2){
div = numb1/numb2;
remainder = numb1 % numb2;
}else{
if (numb2>numb1)
div = numb2/numb1;
remainder = numb2 % numb2;
}
System.out.println("The answer quotient is " +div+ "with a remainder of" +remainder);
任何幫助或建議將不勝感激,謝謝提前
編譯器錯誤不能同時出現運行時錯誤。 – 2013-04-10 19:54:56
'int numb1 =;'對我來說看起來有點奇怪,我認爲它可能是你的問題的地方 – 2013-04-10 19:55:23
@LuiggiMendoza如果編譯器本身崩潰怎麼辦? – 2013-04-10 19:55:45