#include <stdio.h>
#include <unistd.h>

void type(char *msg) {
    for (int i = 0; msg[i] != '\0'; i++) {
        printf("%c", msg[i]);
        fflush(stdout);
        usleep(60000); // typing effect
    }
}

int main() {
    char choice;

    system("clear");   // use "cls" if windows

    printf("\n\n");
    printf("        ❤️     ❤️\n");
    printf("     ❤️     ❤️     ❤️\n");
    printf("        ❤️     ❤️\n");
    printf("\n");
    sleep(1);

    type("hey nayana...\n\n");
    sleep(1);
    type("from the moment you came into my life\n");
    type("everything felt a little more beautiful\n\n");
    sleep(1);

    type("so today i just want to ask you something ❤️\n\n");
    sleep(1);

    type("will you be my valentine 💌 ? (y/n): ");
    scanf(" %c", &choice);

    printf("\n");

    if (choice == 'y' || choice == 'Y') {
        system("clear");
        printf("\n\n");
        printf("        ❤️ ❤️ ❤️ ❤️ ❤️\n");
        printf("     ❤️                         ❤️\n");
        printf("   ❤️     she said YES 😭❤️       ❤️\n");
        printf("     ❤️                         ❤️\n");
        printf("        ❤️ ❤️ ❤️ ❤️ ❤️\n\n");

        type("i promise to love you\n");
        type("annoy you\n");
        type("support you\n");
        type("and choose you every day ❤️\n\n");

        type("i love you sothumma ❤️\n");
        type("        - adith\n\n");
    } 
    else {
        system("clear");
        printf("\n\n");
        printf("        💔 💔 💔\n");
        printf("   error 404: rejection not accepted\n");
        printf("   please press y again 😌❤️\n\n");
    }

    return 0;
}