Last active
April 3, 2016 16:05
-
-
Save DanyEscobar/6430fcbd322844b1aeb74da3b254316b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class Arreglos { | |
| public static void main(String[] args) { | |
| double[] notas = new double [7]; | |
| Scanner leer=new Scanner(System.in); | |
| int i; | |
| double prom=0.0; | |
| double suma=0; | |
| for(i=0; i<notas.length; i++) | |
| { | |
| System.out.println("Digite el valor de la nota= " + i + " "); | |
| notas[i]=leer.nextDouble(); | |
| } | |
| for(i=0; i<notas.length; i++) | |
| { | |
| System.out.println("La posicion " + i + " es = " + notas[i]); | |
| } | |
| for(i=0; i<notas.length; i++) | |
| { | |
| suma+=notas[i]; | |
| } | |
| prom=suma/i; | |
| System.out.println(" " ); | |
| System.out.println("El promedio de las notas es = " + prom); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment