Computer Science, asked by joydeepmullick3, 1 year ago

write a java program to calculate sum of two number

Answers

Answered by deepakpb6hcq
4
Output:Enter the two numbers to add:23Sum of two numbers:5
Answered by Anonymous
8
HEY MATE HERE IS YOUR ANSWER....


import java.io.*;

class sum
{

public static void main(String args[]) throws IOException
{

int a, b, c=0;

BufferedReader br = new BufferedReader(new) InputStreamReader(System.in));

System.out.println("Enter the two numbers to add:");

a = Integer.parseInt(br.readLine());

b = Integer.parseInt(br.readLine());

c = a +b;


System.out.println("sum of two numbers=" + c);


}

}
Similar questions