Hello guys i just started learning C 1 week ago i m trying to do a program for guessing i done it but i wanna try make it like if user put 3 times wrong program will close i did but i have 2 errors in them >>thanks in advanced for your help
Code:#include <stdio.h> #include <string.h> #include <stdlib.h> int main(void){ char szKey[100]="mangos"; char inPut[100]; do{ printf("Please Enter your favorite fruit: "); fgets (inPut, 100, stdin); } while(strcmp(szKey,inPut)); puts("Correct answer"); if(inPut==3) exit(0);}return 0;}