ALGORITMO QUE MUESTRE EL MAYOR DE 3 NÚMEROS INGRESADOS

Categoría de Estructura Condicional Múltiple


Algoritmo para obtener el mayor de tres números

💻 Hacer un programa dónde se ingresen tres números enteros y muestre cual es el mayor de los números ingresados.


Algoritmo en pseint que muestre el mayor valor de los 3 números PSeInt Estricto : DESCARGA EL CÓDIGO

algoritmo que calcule el IGV

Algoritmo en pseint - short youtube
Algoritmo programacion_work
    // Muestra el mayor de tres números
    
    Definir n1, n2, n3 como Entero;
    Escribir "MOSTRAR EL MAYOR DE 3 NÚMEROS";
    Escribir "";
    Escribir Sin Saltar "INGRESE NÚMERO 01 : ";
    Leer n1;
    Escribir Sin Saltar "INGRESE NÚMERO 02 : ";
    Leer n2;
    Escribir Sin Saltar "INGRESE NÚMERO 03 : ";
    Leer n3;
    Si (n1 >= n2 Y n1 >= n3) Entonces
        Escribir "MAYOR ES ", n1;
    SiNo
        Si (n2 >= n1 Y n2 >= n3) Entonces
            Escribir "MAYOR ES ", n2;
        SiNo
            Escribir "MAYOR ES ", n3;
        FinSi
    FinSi
    
FinProceso
mayor valor de los 3 números en pseint

código en python que muestra el mayor de 3 números Python :

print("MOSTRAR EL MAYOR DE 3 NÚMEROS.")
n1 = int(input("INGRESE NÚMERO 01 : "))
n2 = int(input("INGRESE NÚMERO 02 : "))
n3 = int(input("INGRESE NÚMERO 03 : "))
if (n1 > n2 and n1 > n3):
    print("MAYOR ES : ", n1)
elif (n2 > n1 and n2 > n3):
    print("MAYOR ES : ", n2)
else:
    print("MAYOR ES : ", n3)

código en Lenguaje C que muestra el mayor de 3 números LENGUAJE C :

#include<stdio.h>
int main() {
    int n1, n2, n3;
    printf("MOSTRAR EL MAYOR DE 3 NUMEROS.\n\n");    
    printf("INGRESE NUMERO 01 : ");
    scanf("%d",&n1);
    printf("INGRESE NUMERO 02 : ");
    scanf("%d",&n2);    
    printf("INGRESE NUMERO 03 : ");
    scanf("%d",&n3);
    if ( n1 > n2 && n1 > n3 ) {
        printf("\nEL MAYOR ES : %d", n1);         
    } else {
        if ( n2 > n1 && n2 > n3 ) {
            printf("\nEL MAYOR ES : %d", n2);         
        } else {
            printf("\nEL MAYOR ES : %d", n3);  
        }
    }
    return 0;
}

código en Dev C++ que muestra en número mayor Dev C++ :

#include<iostream>
using namespace std;
int main() {
    int n1, n2, n3;
    cout << "MOSTRAR EL MAYOR DE 3 NÚMEROS.\n\n";          
    cout << "INGRESE NÚMERO 01 : ";
    cin >> n1;  
    cout << "INGRESE NÚMERO 02 : ";
    cin >> n2;  
    cout << "INGRESE NÚMERO 03 : ";
    cin >> n3;  	    
    cout << endl;    
    if ( n1 > n2 && n1 > n3 ) {
        cout << "EL MAYOR ES : " << n1 << endl;        
    } else {
        if ( n2 > n1 && n2 > n3 ) {
            cout << "EL MAYOR ES : " << n2 << endl;        
        } else {
            cout << "EL MAYOR ES : " << n3 << endl; 
        }
    }
    return 0;
}

Programar en Java NetBeans mostranndo el mayor número Java NetBeans :

package programacion_work;
import java.util.Scanner;
public class mayor_de_3_numeros {
    public static void main(String[] args) {
        Scanner ingreso=new Scanner(System.in);  
        int n1, n2, n3;
        System.out.print("MOSTRAR EL MAYOR DE 3 NÚMEROS.\n\n");
        System.out.print("INGRESE NÚMERO 01 : ");
        n1 = Integer.parseInt(ingreso.next()); 
        System.out.print("INGRESE NÚMERO 02 : ");
        n2 = Integer.parseInt(ingreso.next());
        System.out.print("INGRESE NÚMERO 03 : ");
        n3 = Integer.parseInt(ingreso.next());
        if (n1 > n2 && n1 > n3) {
            System.out.println("MAYOR ES : " + n1);
        }else{
            if (n2 > n1 && n2 > n3) {
                System.out.println("MAYOR ES : " + n2);
            }else{
                System.out.println("MAYOR ES : " + n3);
            }
        }
    }        
}



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