Simple program, simple problem
printf("Input an integer:");
printf("The smallest negative integer is %d and its position is %d",minimum,pos);
printf("Have a good one\n\n");
So, this small little program is supposed to get 500 numbers from input, and then determine which one is the smallest negative. For instance, between 4 -2 -4 10 -23, the smallest negative number would be -2.
However it does not seem to work because it just prints out the last negative integer which went into the program.
Could someone enlighten me?