#pragma warning (disable : 4996) #include <stdio.h> void sort(int arr[], int length){ } int main(){ int length; int arr[100] = { 0, }; for (int i = 0; i < 100; i++){ scanf("%d", &arr[i]); if (arr[i] == -1){ length = i; break; } } sort(arr, length); for (int i = 0; i < length; i++) printf("%d\t", arr[i]); }