Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 2, 2019 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/4376243e4c4ac126a2d979aa36963192 to your computer and use it in GitHub Desktop.
Save parzibyte/4376243e4c4ac126a2d979aa36963192 to your computer and use it in GitHub Desktop.
#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