Computer Science, asked by harkishan3193, 19 days ago

is a very simple producer to find the sum of numbers entered

Answers

Answered by samarthkrv
0

Answer:

import java.util.Scanner;

public class Sum

{

public static void main(String[] args) {

 System.out.print("Enter a number:");

 Scanner s = new Scanner(System.in);

 int a = s.nextInt();

 System.out.print("Enter another number:");

 int b = s.nextInt();

 int sum = a + b;

 System.out.println(a + " + " + b + " = " + sum);

}

}

Explanation:

Similar questions