home *** CD-ROM | disk | FTP | other *** search
- /* Uso de la sentencia condicional ELSE...IF. */
-
- #include <stdio.h>
-
- main() /* Escribe bebé,niño o adulto */
- {
- int edad;
- printf("Introduce tu edad: ");
- scanf("%d",&edad);
- if (edad<1)
- printf("Lo siento, te has equivocado.");
- else if (edad<3) printf("Eres un bebé");
- else if (edad<13) printf("Eres un niño");
- else printf("Eres adulto");
- }
-