import java.util.Scanner;
public class ListaExercicio1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Digite o primeiro valor inteiro: ");
int valor1 = sc.nextInt();
System.out.println("Digite o segundo valor inteiro: ");
int valor2 = sc.nextInt();
int soma = valor1 + valor2;
System.out.println("A soma dos dois valores é: " + soma);
sc.close();
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: