I'll start by giving the code
Code:
#include <stdio.h>
int main()
{
char user[10];
char enter[10];
printf(" `. . .'\n");
printf(" ) ) (\n");
printf(" `. .' `.\n");
printf(" .' ) )\n");
printf(" ( .` .'\n");
printf(" \n");
printf(" .-~~~`-.'~~-.\n");
printf(" -' ` ` ` `-\n");
printf(" `---....,,,,,...--'\n");
printf(" `--.........--'\n");
printf("\n\n Can you feel the pie?\n");
scanf("%c %c", &user, &enter);
if (user == "yes")
printf("You are worthy\n");
else if (user == "no")
printf("You are not worthy fool\n");
else
printf("What the hell...?\n");
return 0;
}
Ok. First problem. When I run the program, everything goes fine untill it goes through the IF statements. No matter what you type, it outputs random characters. Is there a step i missed? Function i need? I tried declaring char variables yes and no, but result is the same.
And the other problem i have, is actually just a question. All those printf statements create a pie image. Is there a way i can shorten all those steps to get the same result?
Help will be appreciated.