C scanf in loop continues automaticly without input
问题 I'm trying to get input in an array, I expect input like the following. 5 (Number of the second dimensions in the array) 2 (Number of the first dimensions in the array) So we get an array deeln[2][5] in this example. I try to get it with the following code: #include <stdio.h> #include <string.h> #include <stdbool.h> bool isinarray(int val, int *arr, int size){ int countimp; for (countimp=0; countimp < size; countimp++) { if (arr[countimp] == val) return true; } return false; } int main(void){