Hi folks, I have set up the following program to read a series of keys from the keyboard, and then terminate the program. I do this by the use of a do while program that stops once the input reaches a numerical value '10'. This currently however, does not work correctly for me.
Can anyone tell me what I am doing wrong:
Code:/* interface.c: The include functions designed to control the I/O of the PowerMath System */ #include <stdio.h> mathInput() { int x=20; int input; char progInput[x]; do { x=1; progInput[x]=getc( stdin ); progInput[x]=input; x=x+1; } while (input!=10); } int main() { mathInput(); return 0; }