Computer Science, asked by ubadoni, 1 year ago

write a java program to add two numbers

Answers

Answered by kritiku2005
18
Sum of two numbers

public class AddTwoNumbers {
public static void main(String[] args)
{ int num1 = 5, num2 = 15, sum;
sum = num1 + num2;
System.out.println("Sum of these numbers: "+sum); } }

Output:

Sum of these numbers: 20
Answered by rajbeer3u
5
Firstly accept two numbers from user(let it be a and b)
C=a+b:
And print it over
Similar questions