Read value using Buffered Reader
import java.io.*;
class readerdemo1
{
public static void main(String args[])throws IOException
{
int a,b,c;
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
System.out.println("ente the numbers");
a=Integer.parseInt(br.readLine());
b=Integer.parseInt(br.readLine());
c=a+b;
System.out.println(c);
}
}
No comments:
Post a Comment