#include <iostream>
using namespace std;

int main() {
    // Ejemplo Ejercicio 2: Conversor de segundos
    int totalSegundos = 3665;
    int horas = totalSegundos / 3600;
    int minutos = (totalSegundos % 3600) / 60;
    int segundos = totalSegundos % 60;
    cout << "2. Tiempo: " << horas << "h " << minutos << "m " << segundos << "s" << endl;

    // Ejemplo Ejercicio 6: Beca universitaria
    float promedio = 4.6;
    int reprobadas = 0;
    bool ganaBeca = (promedio >= 4.5) && (reprobadas == 0);
    cout << "6. Gana beca (1=Si, 0=No): " << ganaBeca << endl;

    // Ejemplo Ejercicio 9: Reto integrador
    int num = 24;
    bool cumpleReto = (num % 2 == 0) && (num >= 10 && num <= 50);
    cout << "9. Es par y esta entre 10 y 50: " << cumpleReto << endl;

    return 0;
}

Embed on website

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