Hello every body i am new to this community and new to proggraming at all i would like to get some help with a strcmp command which i have promlems with.
well take a look at what i have and what i am try to reach:
well take a look at what i have and what i am try to reach:
Code:
void Q_3()
{
char p[4]="yes";/i dont know if "yes" "no" is what i should do
char j[4]="no";
while( !strcmp(* "p",* "j"));//this is ofcoruse wrong and i dont know what should i do to make it right
{
printf("your name is ***?\n");
scanf("%s",&p,j);//i want the answears to be yes or no only
if(!strcmp("p"))//if its yes
{
printf("hi *** i am glad to see you\n");
}
else if (j == !strcmp("j"))//if its no
{
printf("if you are not *** i dont wish to speak to you\n");
}
else//and here a restart for the while since its not one of the options:yes or no
{
printf("please answer with yes or no only!\n");
}
}
}
Comment