Sorry yall this is for school, but howd u have the switch like u choose different switch the end result is still the welcome to our shop pls help

Question:
HOW DO I MAKE 1. AND 2. CONNECT BUT ONLY AT THE LAST PART WHICH AS WELCOME TO OUR SHOP HELP
Repl link:
https://replit.com/@blushiinme/UnusualSimultaneousNotification#main.c

code snippet

Try this:

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

int main(void) {
    printf("Opening App...\n");
    sleep(2);

    printf("\nYour virtual floral boutique for easy browsing, personalized bouquets, and convenient flower delivery.\n");
    sleep(2);
    puts("\n1. Log in");
    sleep(1);
    puts("2. Sign up");
    sleep(1);

    int options;
    scanf("%d", &options); 

    switch(options) {
        case 1: 
            printf("\nEnter your username: \n");
            char username[50]; 
            scanf("%s", username); 
            printf("Enter your password: \n");
            char password[50]; 
            scanf("%s", password); 
            break;

        case 2: 
            printf("\nEnter your username: \n");
            char username2[50]; 
            scanf("%s", username2); 
            printf("Enter your password: \n");
            char password2[50]; 
            scanf("%s", password2); 
            break;
    }
    return 0;
}

Please do not make posts about school assignments

1 Like