IDENTIFICATION DIVISION.
PROGRAM-ID. FELICIDAD.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 felicidad pic 9(2).
PROCEDURE DIVISION.
DISPLAY “Bienvenido al Sistema de Felicidad”.
DISPLAY “====================================”.
DISPLAY “Ingrese del 1 al 10 para medir el grado de su fecilidad”.
DISPLAY “0 InFeliz”.
DISPLAY “1 al 3 No es Feliz”.
DISPLAY “4 al 7 Felicidad media”.
DISPLAY “8 al 10 Realmente feliz”.
DISPLAY “====================================”.
ACCEPT felicidad.
if felicidad = 0 then
DISPLAY “Ud. Ingreso el N°”
DISPLAY felicidad
DISPLAY “====================================”
DISPLAY “UD. Necesita unas cervezas bien heladas urgente”
else if felicidad > 0 and felicidad <=3
DISPLAY “Ud. Ingreso el N°”
DISPLAY felicidad
DISPLAY “====================================”
DISPLAY “UD. Necesita salir más con sus amigos”
else if felicidad >= 4 and felicidad <=7
DISPLAY “Ud. Ingreso el N°”
DISPLAY felicidad
DISPLAY “====================================”
DISPLAY “Ya le falta poco para alcanzar sus metas”
else if felicidad > 7 and felicidad <=10
DISPLAY “Ud. Ingreso el N°”
DISPLAY felicidad
DISPLAY “====================================”
DISPLAY “FELICIDADES UD. ES REALMENTE FELIZ, COMPARTA SU FELICIDAD CON LOS DEMAS”
ELSE
DISPLAY felicidad
DISPLAY “====================================”
DISPLAY “AH INGRESADO DATOS ERRORES URGENTE IR AL OCULISTA”
End-if.
STOP RUN.
Puedes compilarlo en el siguiente link- Ingresar datos del 1 al 10
https://www.tutorialspoint.com/compile_cobol_online.php