Created
August 2, 2019 22:57
-
-
Save parzibyte/4376243e4c4ac126a2d979aa36963192 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h>// printf | |
#include<stdbool.h>// Booleanos | |
// prototipo | |
bool esMayorDeEdad(int edad); | |
int main(){ | |
bool mayorDeEdad = esMayorDeEdad(15); | |
if(mayorDeEdad){ | |
printf("Eres mayor de edad"); | |
}else{ | |
printf("NO eres mayor de edad"); | |
} | |
} | |
bool esMayorDeEdad(int edad){ | |
if(edad >= 18) return true; | |
else return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment