rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Solution 10107: What is the median?

Welcome Note

Hi,
I'm Anisuzzaman Babla . I am a full stack Android Application Developer. I am working with Android for more than two years. I have completed my graduation from IIT, Jahangirnagar University. I have developed a series of commercially successful apps on Android. Moreover, 10+ of my Apps are live at Google play store. .
Thank You

UVa Solution 10107: What is the median?

#include<iostream>
#include <stdio.h>
using namespace std;
long int list[10050];
int main() {
long int IN, R, I;
int C=1;
list[0]=-9999;
while (scanf("%ld",&IN)!=EOF) {
for (I=C++ ; IN<list[I-1] ; I--) {
list[I]=list[I-1];
}
list[I] = IN;
if (C%2) {
R = (long int)(( list[(int)C/2] + list[(int)C/2 + 1] )/2);
} else {
R = (long int)list[(int)C/2];
}
printf("%ld\n",R);
}
return 0;
}