hey guys i have written a loop that stores numbers in an array and stops when the '\n' key is pressed but this doesnot terminate the loop up to the end of the array.
i dont understand why this doesnt work.Code:#define MAX 10 int n, m; //CODE FRACTMENT. for( int i = 0; i < MAX && n != '\n'; i++) n= scanf(" %d", array[i]; m = getchar();