#include <stdio.h>

int main() {
    int edad;

    printf("Selecciona tu edad: ");
    scanf("%d", &edad);

    if (edad >= 18) {
        printf("Tienes %d años: eres mayor de edad.\n", edad);
    } else {
        printf("Tienes %d años: eres menor de edad.\n", edad);
    }

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: