My assignment is to fix the code. I have my edited code below and the original code below that. I figure I still have a few errors in here. My error checking doesnt seem to w
Here's how I'd go about correcting the code ...
For 1. I used the "original code" as posted by you.
For 2. I used int main(void)
, declared the function get_number
before defining main
, added parenthesis in line 20, and added #include
For 3. I added return 0;
before the final }
of main
. I also removed the extra output that messed up the ideone interface (it looks better on an interactive interface)
Edit more tests needed to complete the task of correcting the original code