原题目Missing numberGiven an array containing all numbers from 1 to N with the exception of one print the missing number to the standard output.
Example input: array: 5 4 1 2
Example output: 3
void find_missing_number(int *v, int n) { int i, sum = (n+1) * (n+2) / 2; for (i=0; i<n; i++) { sum -= v[i]; } printf("%d", sum); }