I just started this mini text-adventure game...... Can you help me with this?
How can I make my last if() function give me 2 separate answers for what I input with my scanf() function (for "Yes" or "No")?
Note that i just started programming yesterday and i got a lot of tutorials at my hand and I really want to learn a lot. Thanks! (I am from Romania btw...)
#include<stdio.h>
main()
{
/*daclaring variables as strings */
char surname[30], name[30];
char decision_1[10];
/* Hello message fallowed by first question*/
printf("Hey! \n\n");
printf("What is you're full name'? \n\n");
/*Here someone can input they're name and then i play around with that. (I will use those later)*/
scanf("%s%s", &surname,name);
printf("\n");
printf("%s %s? Thats how they call u? Aha..... \n\n", surname, name);
/*Here starts the problem*/
printf("Want to play a game? \n\n");
scanf("%s", decision_1);
/*How can I make the above scanf() be followed by the if function give me two answers*/
{
if (decision_1 == "Yes") printf("\nCool!");
else printf("\nNasty!");
}