hey im working on an assignment and am not sure where i went wrong.
the objective is to accept some numbers and then if the array is full or if "0" is entered, the numbers will print in reverse order (where i encountered problem). also, after it displays "numbers in reverse" it restarts the loop..how can i get out also?Code:#include <stdio.h> int main() { int data[99]; int val; int i; for(i=0;i<=99;i++) { printf("Enter an integer value (0 to quit): "); scanf("%d", &val); if(val==0 || val==data[99]) { printf("Values in reverse order: \n%d\n", data[i]); } } return 0; }