Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Being a fresh man,I don't know why.

Posted by NobleQiao at 2006-07-15 08:56:04 on Problem 1000
I only add the two sentence as I marked,Then I get a runtime error.Help me,Thank you.
import java.io.*;
import java.util.*;
public class Main
{
            public static void main(String args[]) throws Exception
            {
            	    Scanner cin=new Scanner(System.in);
                    for(;;)//here
                    {
                    	if(cin==null) break;//here
                    	int a=cin.nextInt();
                    	int b=cin.nextInt();
                        System.out.println(a+b);	
                    }
            }
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator