|
|
back to boardJava import java.io.*; public class D { public static void main (String args []) throws Exception { BufferedReader d = new BufferedReader(new InputStreamReader(System.in)); String v = d.readLine(); BufferedReader e = new BufferedReader(new InputStreamReader(System.in)); String c = e.readLine(); try { int a = Integer.parseInt(v); int b = Integer.parseInt(c); System.out.println(a+b); } catch(Exception e1) {System.out.println("Error translating text to int");} System.out.println(); } } Why Wrong answer?? That he WANT????? Re: Java Posted by Noob 6 Aug 2012 09:46 Read FAQ how to input numbers |
|
|