Difference between revisions of "Java: Soma de dois números inteiros"

From AdonaiMedrado.Pro.Br
Jump to: navigation, search
(No difference)

Revision as of 00:56, 14 August 2010

public class Somador
{
    public static void main(String[] args)
    {
        java.util.Scanner s = new java.util.Scanner(System.in);
        int acumulador=0;
        for(int x=0;x<10;x++)
            acumulador+=s.nextInt();
 
        System.out.println(acumulador);
    }
}