2
Error in C
SofhinWong1 (3)

#include <stdio.h>
#include<string.h>
#include<stdlib.h>

//variable for A1
int menu;
char Name[100];
char Student_ID[100];
char Room[100];
char Bill[100];
int Meal, Gym, Week;

int main(){
printf("1 Room Booking\n2 Room Availability\n3 Payment Details\nPlease enter your option:");
scanf("%i",&menu);
if(menu==1){
A1:
printf("\nPlease enter your name:");
scanf(" %c",&Name);
printf("\nPlease enter your Student ID:");
scanf("%c",& Student_ID);
printf("\n\nPlease choose your gender.\n1 Male\n2 Female");
goto A1;
}
}

When I run the program, it gives me warning.
warning: format specifies type 'char ' but the argument has type 'char ()[100]' [-Wformat]
May I know how to fix it?

You are viewing a single comment. View All
1
SofhinWong1 (3)

@mwilki7 Is there any way to proceed to the next instead of keep repeating the same thing?
Internet:
printf("\nDO you want to subscribe for Internet?\n1 Yes\n2 No\nPlease enter your option:");
scanf("%i",&A1_Internet);
if(A1_Internet==1){
A1_Internet_rate;
printf("How many weeks of subscription?\n");
scanf("%i",&I_week);}
if(A1_Internet==2){
A1_Internet=0;}
else{
goto Internet;}