Buscar
Social
Ofertas laborales ES
« programacion en java Me | Main | lec-2 »
lunes
mar122012

Programita java que suma dos numeros(ith)

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");

    }}

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.
Member Account Required
You must have a member account on this website in order to post comments. Log in to your account to enable posting.