#include <iostream>
using namespace std;

int main() {
    int edad;
    cout << "Introduce tu edad: ";
    cin >> edad;

    if (edad >= 0 && edad <= 12) {
        cout << "Eres un niño." << endl;
    } else if (edad >= 13 && edad <= 18) {
        cout << "Eres un adolescente." << endl;
    } else if (edad >= 20 && edad <= 59) {
        cout << "Eres un adulto." << endl;
    } else if (edad >= 60) {
        cout << "Eres un anciano." << endl;
    } else {
        cout << "Edad no valida." << endl;
    }

    return 0;
}

Embed on website

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