ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Actividad 2 Sena Variable Java


Enviado por   •  23 de Abril de 2022  •  Tareas  •  1.000 Palabras (4 Páginas)  •  71 Visitas

Página 1 de 4

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package notas;

import java.util.Scanner;

/**

*

* @author milto

*/

public class Notas {

/**

* @param args the command line arguments

*/

@SuppressWarnings("empty-statement")

public static void main(String[] args) {

int menu, m, e=1, i=1, alumnos;

double notas, notas2, notas3, total=0, total2=0, total3=0, promedio=0, promedio1=0, Promedio2=0;

Scanner r = new Scanner(System.in);

System.out.println("Ingrese 1 para calcular promedio de notas:");

menu =r.nextInt();

switch (menu)

{

case 1:

System.out.println("ingrese la cantidad de alumnos:");

alumnos =r.nextInt();

System.out.println("\nLa cantidad de alumnos es:"+alumnos);

for(m=1; m<=alumnos; m++)

{

System.out.println("Ingrese la nota del alumno" + m + "en la materia de matématicas");

notas= r.nextDouble();

total= total + notas;

promedio= total/alumnos;

...

Descargar como (para miembros actualizados)  txt (2.4 Kb)   pdf (35.8 Kb)   docx (8 Kb)  
Leer 3 páginas más »
Disponible sólo en Clubensayos.com