|
|
вернуться в форумPLEASE!!!!! HELP ME!!!!!!WHY WA#5?HERE IS MY CODE!!!!!!!! #include<stdio.h> #include<algorithm> using namespace::std; int main() {int n,i; scanf("%d", &n); float *a=new float[n]; for(i=1;i<=n;i++) scanf("%f" ,&a[i]); sort(a,a+(n+1)); if(n%2!=0) printf("%.1f",(a[(n+1)/2])); else printf("%.1f" ,(a[n/2]+a[(n/2)+1])/2); return 0; }
You cannot store exact value of number in range (1;2^32-1) in 32-bit type float (-) Re: You cannot store exact value of number in range (1;2^32-1) in 32-bit type float (-) THANK!I'LL THINK ABOUT IT! |
|
|