Lệ
Tổng số bài gửi : 16 Join date : 06/12/2022
| Tiêu đề: bai2.pascal Tue Dec 13, 2022 8:08 pm | |
| - Code:
-
8) 8) 8) 8) 8) uses math; var i,n,dem:longint; tbc:real; a:array [-5..100005] of longint; begin assign(input,'Arr1b2.inp'); reset(input); assign(output,'Arr1b2.out'); rewrite(output); readln(n); for i:=1 to n do read(a[i]); tbc:=0; for i:=1 to n do begin tbc:=tbc+a[i]; end; tbc:=tbc/n; dem:=0; for i:=1 to n do if a[i]>=tbc then inc(dem); write(dem); close(input); close(output); end. | |
|