ALGORITMO QUE CONSULTA SI UN VALOR ESTÁ EN EL RANGO DE 50 A 100

Categoría de Estructura Condicional Múltiple


CÓDIGO QUE MUESTRA SI UN NÚMERO ESTÁ DENTRO DE UN RANGO.

💻 Hacer un programa que permita ingresar un número entero y consulte si este número está en el rango de 50 a 100, caso contrario mostrar un mensaje de error.


Algoritmo en pseint que muestre si está en el rango de 50 a 100 PSeInt Estricto : DESCARGA EL CÓDIGO

algoritmo que calcule el IGV

Algoritmo en pseint - short youtube
Algoritmo programacion_work
    Definir num como Entero;
    Escribir "MUESTRA SI ESTÁ EN EL RANGO DE 50 A 100";
    Escribir Sin Saltar "INGRESE NÚMERO : ";
    Leer num;
    Si (num >= 50 Y num <= 100) Entonces
        Escribir "EL VALOR SI ESTÁ EN EL RANGO DE 50 a 100";
    SiNo
        Escribir "ERROR : NO ESTÁ EN EL RANGO";
    FinSi
FinAlgoritmo
muestre si está en el rango de 50 a 100

código en python que muestra está dentro del rango Python :

print("MOSTRAR SI UN NÚMERO ESTÁ EN EL RANGO DE 50 A 100")
num = int(input("INGRESE NÚMERO : "))
if num >= 50 and num <=100:
    print("EL VALOR SI ESTÁ EN EL RANGO")
else:
    print("ERROR : NO ESTÁ EN EL RANGO")

código en Lenguaje C que muestra si un número está en el rando de A a B Lenguaje C :

#include<stdio.h>
int main() {
    int num;
    printf("01. MUESTRA UN NUMERO DENTRO DE 50 A 100.\n\n");           
    printf("INGRESE NUMERO : ");
    scanf("%d",&num);
    if (num >= 50 && num <= 100) {
        printf("\nEL VALOR SI ESTA EN EL RANGO");    
    }else{
    	printf("\nERROR : NO ESTA EN EL RANGO"); 
	}
    return 0;
}

código en Dev C++ que indica si está en el rango de 50 a 100 Dev C++ :

#include<iostream>
using namespace std;
int main() {
    int num;
    cout << "01. MUESTRA UN NUMERO DENTRO DE 50 A 100." << endl;
    cout << "INGRESE NUMERO : ";
    cin >> num;		
    if(num >= 50 && num <= 100){
        cout << "EL VALOR SI ESTA EN EL RANGO" << endl;	
    }else{
        cout << "ERROR : NO ESTA EN EL RANGO" << endl;	
    }
    return 0;
}

Programar en Java NetBeans si un número está en el rango de 50 a 100 Java NetBeans :

package programacion_work;
import java.util.Scanner;
public class mostrar_rango {
    public static void main(String[] args) {
        int num;        
        Scanner ingreso=new Scanner(System.in);
        System.out.print("INGRESE NUMERO : ");
        num = Integer.parseInt(ingreso.next());        
        if(num >= 50 && num <= 100){
            System.out.println("EL VALOR SI ESTÁ EN EL RANGO DE 50 a 100");	
        }else{
            System.out.println("ERROR : NO ESTA EN EL RANGO");	
        }   
    }      
}



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