132k views
2 votes
Can anyone help me correct my code ​

Can anyone help me correct my code ​-example-1
User Forivall
by
6.4k points

1 Answer

5 votes

Answer:

#include <stdio.h>

//below is the function prototype for the checkStatus function

//It simply tells the compiler what the return type and

//parameter types it takes. It is nothing more than a copy

//of the function header (line 16)

int checkStatus();

int main(){

int status;

status = checkStatus();

printf("Your vaccination status code is %d\\", status);

}

int checkStatus(){

int selection;

printf("~ Status of vaccination ~\\");

printf("-------------------------\\");

printf("1. Pending for appointment\\");

printf("2. Completed first dose\\");

printf("3. Completed second dose\\");

printf("4. Exit\\\\");

printf("Enter your selection(1 - 4): ");

scanf("%d", &selection);

return selection;

}

Step-by-step explanation:

User Wolfgangwalther
by
5.9k points