ok why does my program not even allow me to enter in a character for the "c" variable?
heres the code:
Code:
#include <stdio.h>
main()
{
int board[30][30] = {{0}, {0}};
int b_rows, b_cols;
char gem[27];
int gem_value[27];
char c;
scanf("%d%d", &b_rows, &b_cols);
printf("Rows = %d Cols = %d\n", b_rows, b_cols);
printf("Enter a Character: ");
scanf("%c", &c);
printf("%c", c);
return 0;
}
here's the output:
Code:
4 5
Rows = 4 Cols = 5
Enter a Character:
%
its not even allowing me to enter a character in, what simple thing am i missing?