I am having trouble running the following code. I am getting a message segmentation fault (core dumped)
Code:#include<stdio.h> #include<ctype.h> #include<time.h> main() { int iuser; int irand; srand(time(NULL)); irand = (rand() % 10) + 1; printf("Guess a Number: "); scanf("%f", &iuser); if ( isdigit(iuser) == 0) { printf("Please enter a number next time."); } else { if ( iuser == irand ) printf("Woot Woot you got it right."); else printf("sorry you lost."); } getchar(); getchar(); getchar(); }