import java.io.*;
class Asignment12
{
public static void main(String surat[]) throws IOException
{
InputStreamReader i=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(i);
int a=0;
int b=0;
int c;
System.out.print("A: ");
a=Integer.parseInt(br.readLine());
System.out.print("B: ");
b=Integer.parseInt(br.readLine());
c=a+b;
System.out.println("Addition : "+c);
}
}
Output:
class Asignment12
{
public static void main(String surat[]) throws IOException
{
InputStreamReader i=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(i);
int a=0;
int b=0;
int c;
System.out.print("A: ");
a=Integer.parseInt(br.readLine());
System.out.print("B: ");
b=Integer.parseInt(br.readLine());
c=a+b;
System.out.println("Addition : "+c);
}
}
Output:
No comments:
Post a Comment