ALGORITMO QUE MUESTRA LAS ESTACIONES DEL AÑO EN PERÚ

Categoría de Estructura Selección


Código que muestra la estación del año en PSeInt

💻 Hacer un programa que ingrese un número del 1 al 4 y muestre a que estación del año pertenece en Perú.

1 = VERANO
2 = OTOÑO
3 = INVIERNO
4 = PRIMAVERA

Estaciones del año en Perú.


Algoritmo en pseint que muestra las estaciones del año PSeInt Estricto : DESCARGA EL CÓDIGO

algoritmo que calcule el IGV

Algoritmo en pseint - short youtube
Algoritmo programacion_work
    Definir estacion como Entero;	
    Escribir "03. MUESTRA LAS ESTACIONES DEL AÑO";
    Escribir "";
    Escribir Sin Saltar "INGRESE UN NÚMERO DEL [1 AL 4] : ";
    Leer estacion;	
    Segun (estacion) hacer
        1 : Escribir "ES VERANO";
        2 : Escribir "ES OTOÑO";
        3 : Escribir "ES INVIERNO";
        4 : Escribir "ES PRIMAVERA";        
    FinSegun
FinAlgoritmo
Algoritmo en pseint que muestra las estaciones del año

código en python que muestra que estación del año pertenece un número del 1 al 4 Python :

print("MOSTRAR LAS ESTACIONES DEL AÑO")
estacion = int(input("INGRESE UN NÚMERO DEL [1 AL 4] : "))
if estacion == 1:
    print("ES VERANO")
elif estacion == 2:
    print("ES OTOÑO")
elif estacion == 3:
    print("ES INVIERNO")
elif estacion == 4:
    print("ES PRIMAVERA")

código en Lenguaje C, que muestra la estación del año que corresponde Lenguaje C :

#include<stdio.h>
int main() {
	int estacion;
	printf("03. MUESTRA LAS ESTACIONES DEL ANIO.\n\n");
	printf("INGRESE UN NÚMERO DEL [1 AL 4] : ");
	scanf("%d",&estacion);
	switch(estacion){
        case 1 : printf("ES VERANO"); break;
        case 2 : printf("ES OTONIO"); break;
        case 3 : printf("ES INVIERNO"); break;
        case 4 : printf("ES PRIMAVERA"); break;        
    }	
    return 0;
}

código en Dev C++ que ingresa un número del 1 al 4 y muestra su estación del año respectivo Dev C++ :

#include<iostream>
using namespace std;
int main() {
    int estacion ;
    cout << "03. MUESTRA LAS ESTACIONES DEL ANIO." << endl;
    cout << "INGRESE UN NÚMERO DEL [1 AL 4] : ";
    cin >> estacion ;		
    switch(estacion){
        case 1 : cout << "ES VERANO" << endl; break;
        case 2 : cout << "ES OTONIO" << endl; break;
        case 3 : cout << "ES INVIERNO" << endl; break;
        case 4 : cout << "ES PRIMAVERA" << endl; break;
    }
    return 0;
}

Programar en Java NetBeans que muestra a que estación del año pertenece un número del 1 al 4 Java NetBeans :

package programacion_work;
import java.util.Scanner;
public class muestra_estaciones {
    public static void main(String[] args) {        
        int estacion ;  
        Scanner ingreso=new Scanner(System.in);
        System.out.print("INGRESE UN NÚMERO DEL [1 AL 4] : ");
        estacion = Integer.parseInt(ingreso.next());        
        switch(estacion){
            case 1 : System.out.println("ES VERANO"); break;
            case 2 : System.out.println("ES OTOÑO"); break;
            case 3 : System.out.println("ES INVIERNO"); break;
            case 4 : System.out.println("ES PRIMAVERA"); break;
        }	
    }    
}



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