|
|
back to board#include <iostream> using namespace std; void main() { int N,i,tmp; float y=0; cin>>N; for (i=1;i<=N;i++) { cin>>tmp; y+=tmp; } y/=N; printf("%0.1f",y); } I think you misunderstood the problem.What you caculated is the mean or average of the data ,Not the median.If you don't know what the median means,Please read the problem again carefully. |
|
|