Demo entry 4045808

Soma.java

   

Submitted by anonymous on Mar 15, 2016 at 01:17
Language: Java. Code size: 437 Bytes.

import java.util.Scanner;

public class Soma
{	
	public static void main(String args[])
	{
		int num1;
		int num2;
		int sum;
		Scanner input;

		input = new Scanner(System.in);
		
		System.out.println("Informe o primeiro número:");
		num1 = input.nextInt();
		
		System.out.println("Informe o segundo número:");
		num2 = input.nextInt();
		
		sum = num1 + num2;
		
		System.out.printf("A soma é %d\n",sum);
	}
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).