I want to write a program to remove the first smallest number that i input..
input 6 integer from keyboard, they are 12 15 2 16 2 4
how can i amend the program that can remove the first '2' and shift ithe first '2' 's right hand side number to left, thanks.
Output is : 12 15 16 2 4
Code:void RemoveFirstSmallest(int A[], int n) //A is an array containing n integers { int i; int min_value = A[0]; int id_min = 0; for (i=1; i<n;i++) { if (A[i] < min_value) { min_value = A[i]; id_min = i; } } for (i=id_min;i<n-1;i++) { A[i] = A[i+1]; } }