Programita java que suma dos numeros(ith)
lunes, marzo 12, 2012 at 3:47PM
ernest

package javasuma;

import java.util.Scanner;

public class Javasuma{

 

public static void main(String[] args) {

   Scanner captura=new Scanner(System.in);

int x1;

int x2;

int total;

 

System.out.print("Elemento uno: ");

x1=captura.nextInt();

System.out.print("Elemento dos: ");

x2=captura.nextInt();

total= x1 + x2;

System.out.print("Total: "+total);

System.out.print("\n");

    }}

Article originally appeared on javaHispano (http://www.javahispano.org/).
See website for complete article licensing information.