Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. package ej13;
  2. import java.util.Scanner;
  3.  
  4. public class Ejercicio13 {
  5.  
  6.     public static void main(String[] args) {
  7.         Scanner sc = new Scanner(System.in);
  8.         int total = 0, vueltas = 0;
  9.        
  10.         while (vueltas < 10) {
  11.             vueltas++;
  12.            
  13.             System.out.print("Introduce tu nΓΊmero " + vueltas + ": ");
  14.             total += sc.nextInt();
  15.         }
  16.        
  17.         System.out.println("La media de tus numeros es: " + total / 10);
  18.         sc.close();
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement