ALGORITMO QUE MUESTRA EL NIVEL ACADÉMICO

Categoría de Estructura Selección


Código que muestra el nivel educativo de un alumno en PSeInt

💻 Se pide ingresar 3 notas y calcular el promedio de un alumno, según su promedio mostrar el nivel académico del alumno :

* De 00 a 10 = Malo.
* De 11 a 13 = Regular.
* De 14 a 16 = Bueno.
* De 17 a 20 = Muy bueno


Algoritmo en pseint que muestra en que nivel está el alumno PSeInt Estricto : DESCARGA EL CÓDIGO

algoritmo que calcule el IGV

Algoritmo en pseint - short youtube
Algoritmo programacion_work
    Definir N1, N2, N3, Prom como Entero;
    Escribir "MUESTRA EL NIVEL ACADÉMICO.";    
    Escribir Sin Saltar "Ingrese Nota 1 : ";
    Leer N1;
    Escribir Sin Saltar "Ingrese Nota 2 : ";
    Leer N2;
    Escribir Sin Saltar "Ingrese Nota 3 : ";
    Leer N3;
    Prom <- redon((N1 + N2 + N3)/3);
    Segun Prom Hacer
        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10: Escribir "NIVEL MALO";
        11, 12, 13 : Escribir "NIVEL REGULAR";
        14, 15, 16 : Escribir "NIVEL BUENO";
        17, 18, 19, 20 : Escribir "NIVEL MUY BUENO";
    FinSegun
FinAlgoritmo
Algoritmo en pseint que muestra en que nivel está el alumno

código en python que muestra el nivel académico del alumno Python :

print("MUESTRA EL NIVEL ACADÉMICO.")
N1 = int(input("Ingrese Nota 1 : "))
N2 = int(input("Ingrese Nota 2 : "))
N3 = int(input("Ingrese Nota 3 : "))
prom = round( ((N1 + N2 + N3)/3), 0)
if prom >= 0 and prom <= 10:
    print("NIVEL MALO")
elif prom >= 11 and prom <= 13:
    print("NIVEL REGULAR")
elif prom >= 14 and prom <= 16:
    print("NIVEL BUENO")
elif prom >= 17 and prom <= 20:
    print("NIVEL MUY BUENO")

código en Lenguaje C que muestra cual es el nivel del alumno Lenguaje C :

#include<stdio.h>
#include<math.h>
int main(){   
    float n1, n2, n3;
    int prom;
    printf("MUESTRA EL NIVEL ACADÉMICO.\n\n");
    printf("Ingrese Nota 1 : ");   
    scanf("%f",&n1);
    printf("Ingrese Nota 2 : ");   
    scanf("%f",&n2);
    printf("Ingrese Nota 3 : ");   
    scanf("%f",&n3);
    prom = (int) round((n1+n2+n3)/3);
    switch(prom){
        case 0 ... 10:   
            printf("\nNIVEL MALO \n");
            break;
        case 11: case 12: case 13:
            printf("\nNIVEL REGULAR \n");
            break;
        case 14: case 15: case 16:
            printf("\nNIVEL BUENO \n");
            break;         
        case 17: case 18: case 19: case 20:
            printf("\nNIVEL MUY BUENO \n");
            break;         
    }
    return 0;
}

código en Dev C++ que al ingresar la nota muestre el nivel académico Dev C++ :

#include<iostream>
#include<cmath>
using namespace std;
int main(){   
    float n1, n2, n3;
    int prom;
    cout << "MUESTRA EL NIVEL ACADÉMICO." << endl << endl;
    cout << "Ingrese Nota 1 : ";   
    cin >> n1;
    cout << "Ingrese Nota 2 : ";
    cin >> n2;
    cout << "Ingrese Nota 3 : ";   
    cin >> n3;
    prom = int((n1+n2+n3)/3);
    switch(prom){
        case 0 ... 10:   
            cout << "NIVEL MALO" << endl;
            break;
        case 11: case 12: case 13:
            cout << "NIVEL REGULAR" << endl;
            break;
        case 14: case 15: case 16:
            cout << "NIVEL BUENO" << endl;
            break;         
        case 17: case 18: case 19: case 20:
            cout << "NIVEL MUY BUENO" << endl;
            break;         
    }
    return 0;
}

Programar en Java NetBeans que calcule el promedio y muestre su nivel Java NetBeans :

package programacion_work;
import java.util.Scanner;
public class nivel_academico {
    public static void main(String[] args) {
        int n1, n2, n3, promedio;
        Scanner ingreso=new Scanner(System.in);
        System.out.print("Ingrese Nota 1 : ");
        n1 = Integer.parseInt(ingreso.next());
        System.out.print("Ingrese Nota 2 : ");
        n2 = Integer.parseInt(ingreso.next());
        System.out.print("Ingrese Nota 3 : ");
        n3 = Integer.parseInt(ingreso.next());
        promedio = ((n1 + n2 + n3)/3);
        switch(promedio){
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
               System.out.println("MALO"); break;
            case 11:
            case 12:
            case 13:
               System.out.println("REGULAR"); break;
            case 14:
            case 15:
            case 16:
               System.out.println("BUENO"); break;
            case 17:
            case 18:
            case 19:
            case 20:
               System.out.println("MUY BUENO"); break;
        }
    }
}

Programar en Visual Basic .Net dónde al obtener el promedio muestre su nivel Visual Basic .NET Console :

Imports System.Console
Module nivel_academico
    Dim N1, N2, N3 As Integer
    Dim Prom As Decimal
    Sub Main()
        Write("Ingrese Nota 1 : ")
        N1 = ReadLine()
        Write("Ingrese Nota 2 : ")
        N2 = ReadLine()
        Write("Ingrese Nota 3 : ")
        N3 = ReadLine()
        Prom = (N1 + N2 + N3) / 3
        Select Case Prom
            Case 0 To 10 : Write("MALO")
            Case 11 To 13 : Write("REGULAR")
            Case 14 To 16 : Write("BUENO")
            Case 17 To 20 : Write("MUY BUENO")
        End Select
        ReadLine()
    End Sub
End Module



Facebook de www.programacion.work. Canal de Youtube de www.programacion.work. Twitter de www.programacion.work. TikTok de www.programacion.work.


Política de cookies

Política de Privacidad

Aviso Legal y Términos De Uso