0
Помогите разобраться с Scanner
Объясните как ним пользоваться и как создать программу которая пишет суму двох чисел вводимых из клавиатуры
1 Answer
0
import java.util.Scanner;
public class Summ {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("Input first integer number >>>");
        int firstInt = sc.nextInt();
        System.out.print("Input second integer number >>>");
        int secondInt = sc.nextInt();
        System.out.println(firstInt + " + " + secondInt + " = " + (firstInt + secondInt));
    }
}



