0_0_2846954_23016\Main.java:1: 进行语法解析时已到达文件结尾
import java.io.*; import java.util.*; import java.math.*; public class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner cin=new Scanner(System.in); BigInteger elem[] = new BigInteger[10]; String str; int i,j; for(i=0;i<10;i++) elem[i] = BigInteger.ONE; while(cin.hasNext()){ str = cin.next(); if(str.length()==3) { elem[str.charAt(0)-'A'] = elem[str.charAt(2)-'A']; } else { if(str.charAt(1) == '+') elem[str.charAt(0)-'A'] = elem[str.charAt(0)-'A'].add(elem[str.charAt(3)-'A']); else elem[str.charAt(0)-'A'] = elem[str.charAt(0)-'A'].multiply(elem[str.charAt(3)-'A']); } } for(i=0;i<10;i++) { System.out.println(elem[i]); } } }
^
1 错误
|