Những câu hỏi liên quan
Trường
Xem chi tiết
Trường
Xem chi tiết
Nguyễn Lê Phước Thịnh
2 tháng 3 2022 lúc 23:15

uses crt;

var a,b,c,nn:integer;

begin

clrscr;

readln(a,b,c);

nn:=a;

if nn>b then nn:=b;

if nn>c then nn:=c;

writeln(nn);

readln;

end.

Bình luận (0)
Trường
Xem chi tiết
Trường
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 4 2022 lúc 22:43

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.

Bình luận (0)
Trường
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 4 2022 lúc 22:42

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.

Bình luận (0)
hữu minh nguyễn
Xem chi tiết
Nguyễn Quốc Đạt
26 tháng 10 2023 lúc 11:42

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.

Bình luận (0)
Trường
Xem chi tiết
Nguyễn Lê Phước Thịnh
11 tháng 3 2022 lúc 15:43

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.

Bình luận (0)
Susama
Xem chi tiết
Nguyễn Lê Phước Thịnh
9 tháng 11 2021 lúc 23:13

uses crt;

var a,b:int64;

begin

clrscr;

readln(a,b);

writeln(a*a+b*b);

readln;

end.

Bình luận (0)
hữu minh nguyễn
Xem chi tiết
Nguyễn Quốc Đạt
26 tháng 10 2023 lúc 13:48

Program HOC24;
var st,st1,st2: string;
i: byte;
f: text;
const fi='SPLIT.INP ' ;
    fo = 'SPLIT.OUT' ;
Procedure ip;
begin
        assign(f,fi);
        reset(f);a
        read(f,st);
        close(f);
end;
Procedure out;
begin
        assign(f,fo);
        rewrite(f);
     st1:='' st2:=''
        for i:=1 to length(st) do
                begin
                        if st[i] in ['A'..'z'] then st1:=st1+st[i];
                        if st[i] in ['0'..'9'] then st2:=st2+st[i];
                end;
        writeln(f,st1);
        write(f,st2);
        close(f);
end;
Begin
ip;
out;
End.

Bình luận (0)