Originally Posted by
vincent01910
Hey,
You have two issues in your code.
1. Getting 10 times bigger numbers: You need to properly end user input with '\0' in getNumber function because atoi will look to it to determine the end of the string. Otherwise if you input a big number first(more than one digits) and then small numbers, you get garbage in the rest of the cells(meaning if you input 100 the first time you probably get 100 times bigger values afterwards).
2. Not sorting correctly: sizeof(numbersToSort) changed to 10 will work fine in your case. Evil sizeof...