My program compiles ok but it when it calls the getinput() function it never prompts for input.
Edited to show more code, I added fflush but it still skips it for some reason.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
main(){
char mystring[] = "It's equal to it. ";
int k = 32;
int e;
printf("Enter a number: ");
scanf("%d",&e);
if(e == k){
printf("\n\n%s\n",mystring);
} else if(e < k){
printf("\n\n%d\n",e);
} else {
getinput();
}
exit(0);
}
int getinput(){
char gettext[64];
printf("Enter text here: ");
fflush(stdout);
fgets(gettext, 64, stdin);
printf("\n\nYou entered: %s\n\n",gettext);
return 0;
}