Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.lang.*;
- import java.util.Scanner;
- public class Main {
- public static void main(String a[]) {
- Scanner reader = new Scanner(System.in);
- int numero = 0;
- int somma = 0;
- do {
- somma += numero;
- System.out.print("Inserire un numero: ");
- numero = reader.nextInt();
- } while(numero != 0);
- System.out.println("Somma numeri inseriti: " + somma);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement