On Thu, May 24, 2012 at 11:24 PM, Registered user
<[email protected]>wrote:
> how do i stop processing input....
>
> how should i accept this input, no. of test cases not given
>
> i used below code but its giving error... plz help
>
> while(1==1)
> {
> i=scan.nextInt();
> j=scan.nextInt();
>
> //some processing n output
>
>
> }
>
> 1 10
> 100 200
> 201 210
> 900 1000
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-code?hl=en.
>
use try catch statement..
try{
i=scan.nextInt();
}
catch(Exception e){
break;
}
j=scan.nextInt();
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-code?hl=en.