Answers for "ava program to add two numbers taking input from user"

0

ava program to add two numbers taking input from user

import java.util.Scanner;public class Main{public static void main(String[] args){int a, b, sum;Scanner sc = new Scanner(System.in);System.out.println("Enter First Number: ");a = sc.nextInt();System.out.println("Enter Second Number: ");b = sc.nextInt();sc.close();sum = a + b;System.out.println("Sum of these numbers: "+sum);}}
Posted by: Guest on June-12-2021

Code answers related to "ava program to add two numbers taking input from user"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language