Lập trình pascal ạ
Mn giúp mình với
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:array[1..100]of real;
i,n,dem:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
dem:=0;
for i:=1 to n do
if a[i]>=8 then inc(dem);
writeln(dem);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
a: if (a=b) or (b=c) or (a=c) then writeln('Tam giac can');
b: if (a=c) and (b=c) then writeln('Tam giac deu');
c: if (x mod 2<>0) and (x mod 3=0) then writeln('x la so nguyen le va chia het cho 3');
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a,b:int64;
begin
clrscr;
readln(a,b);
writeln(a*a+b*b);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:array[1..100]of integer;
i,n,min:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
min:=a[1];
for i:=1 to n do
if min>a[i] then min:=a[i];
writeln(min);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
Program HOC24;
var st,st1,st2: string;
i,n,d,k,j: integer;
t,m: longint;
a: array[1..10000] of integer;
f: text;
const fi='SUBSUM.INP' ;
fo = 'SUBSUM.OUT' ;
Procedure ip;
begin
assign(f,fi);
reset(f);
readln(f,n,m);
for i:=1 to n do read(f,a[i]);
close(f);
end;
Procedure out;
begin
assign(f,fo);
rewrite(f);
d:=0;
for i:=1 to n-1 do
Begin
If a[i]=m then d:=d+1;
for j:=i+1 to n do
begin
t:=0;
for k:=i to j do t:=t+a[k];
if t=m then d:=d+1;
end;
End;
if a[n]=m then d:=d+1; write(f,d);
close(f);
end;
Begin
ip;
out;
End.
uses crt;
var a:array[1..200]of real;
i,n:integer;
tb:real;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
tb:=0;
for i:=1 to n do tb:=tb+a[i];
writeln(tb/n:4:2);
readln;
end.