Ok, this is my 3rd time asking a question so far I can see that people here are very helpful and I appreciate it :) today I have a question if something like this is possible
#include<stdio.h>
#include<stdlib.h>
int difficulty()
{
char difficulty;
printf("Level of difficulty? (l-Low,h-High) - ");
scanf("%c",&difficulty);
if (difficulty == 'l')
printf("WEAK! :3\n");
else if (difficulty == 'h')
printf("PRO! XD");
else
printf("WRONG LETTER!\n");
return 0;
}
int cheat()
{
char cheat;
printf("need cheats? <y-Yes,n-No>");
scanf("%c",&cheat);
if (cheat=='y')
return 0;
if (cheat=='n')
return 1;
}
int main()
{
difficulty();
cheat(cheat);
system("pause");
return 0;
}
I can compile it but only 1 of the scanf worked :( I will appreciate any help given.