Skip to content

Instantly share code, notes, and snippets.

@Rafael11j
Created February 16, 2017 23:39
Show Gist options
  • Select an option

  • Save Rafael11j/a62288aac3f6183f7f0989acddd1ed29 to your computer and use it in GitHub Desktop.

Select an option

Save Rafael11j/a62288aac3f6183f7f0989acddd1ed29 to your computer and use it in GitHub Desktop.
package exercicícios;
import java.util.Scanner;
public class Exercício01 {
public static void main(String[] args) {
Scanner abre = new Scanner(System.in);
int n1, n2, soma;
System.out.println("Digite o primeiro número: ");
n1 = abre.nextInt();
System.out.println("Digite o segundo número: ");
n2 = abre.nextInt();
soma = n1 + n2;
System.out.println("A soma é igual a: " + soma);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment