#4187: (JAVA)看不懂錯誤信息~ 幫幫忙~


elsonhao87 (暨大)


import java.util.Scanner;

public class Test1
{
    public static void main(String []argv )
    {
        Scanner input = new Scanner(System.in);
        while(input.hasNext())
        {
            String data = input.nextLine();
            char [] temp = data.toCharArray();
            int line = data.length();
            for(int i=0; i<line; i++)
            {
                temp[i]-=7;
                System.out.print(temp[i]);    
            }
        }
    }    
}
 
與正確輸出不相符(line:1)
您的答案為: *CDC is the trademark of the Control Data Corporation.*IBM  ...略(為甚麼會印出這個??)
正確答案為: *CDC is the trademark of the Control Data Corporation.
 
我看不懂錯在那裏???   個位高手幫幫忙~ 謝謝