분명히 이것은 완성 된 프로그램이 아닙니다. 볼 수 있듯이 몇 가지 분수로 무언가를하려고합니다.하지만, input.nextLong(); 어떤 이상한 이유 때문에 유효한 기호로 인식되지 않고 있습니까? input.nextLong(); 상징으로 인식되지 않습니까?
내가 오류는 다음 링크에서 볼 수
import java.lang.Math;
import java.util.Scanner;
import java.io.PrintStream;
import type.lib.*;
public class Check04A
{
\t public static void main(String[] args)
\t {
\t \t PrintStream print = new PrintStream(System.out);
\t \t Scanner scan = new Scanner(System.in);
\t \t print.println("For each fraction enter its numerator/denominator,");
\t \t print.println("pressing ENTER after each");
\t \t print.println("Enter x");
\t \t Fraction x = new Fraction(input.nextLong(),input.nextLong());
\t \t print.println("Enter y");
\t \t Fraction y = new Fraction(input.nextLong(),input.nextLong());
\t \t print.println("Enter z");
\t \t Fraction z = new Fraction(input.nextLong(),input.nextLong());
\t \t print.println("Enter t");
\t \t Fraction t = new Fraction(input.nextLong(),input.nextLong());
\t }
}
감사
당신은scan
라는 이름
Scanner
변수 당신로 사용하고있다
'분수'란 무엇입니까 –
스캐너 변수는 '입력'이 아니라 '스캔'이라고합니다. – Eran