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.
Program HOC24;
var i.n: integer;
a: array[1..250] of integer;
begin
for i:=1 to n do
begin
write('Nhap diem toan cua ban thu ',i,': '); readln(a[i]);
end;
for i:=1 to n do write(a[i],' ');
readln
end.
uses crt;
var i:integer;
a:array[1..20]of string;
begin
clrscr;
for i:=1 to 20 do readln(a[i]);
for i:=1 to 20 do
writeln('Xin chao, ban thu ',i,' ten la: ',a[i]);
readln;
end.
Program Hoc24;
var i: byte;
begin
for i:=1 to 20 do
writeln('Chao ban thu ',i);
readln
end.
Đề 1:
uses crt;
var a:array[1..100]of integer;
i,n,min:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
min:=a[1];
for i:=1 to n do
if min>a[i] then min:=a[i];
writeln(min);
readln;
end.
Đề 2:
uses crt;
var a:array[1..100]of integer;
i,n,max:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
max:=a[1];
for i:=1 to n do
if max<a[i] then max:=a[i];
writeln(max);
readln;
end.
uses crt;
var b:array[1..100]of integer;
i,n,min:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('B[',i,']='); readln(b[i]);
end;
min:=b[1];
for i:=1 to n do
if min>b[i] then min:=b[i];
writeln('So nho nhat la: ',b[i]);
readln;
end.
var a,b: real;
begin
write('Nhap a,b: '); readln(a,b);
if a < b then writeln(a:5:2) else if a > b then writeln(b:5:2) else writeln('Khong co');
end.
uses crt;
var a,b:real;
begin
clrscr;
repeat
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
until a<>b;
if a<b then writeln('So nho nhat la: ',a:4:2)
else writeln('So nho nhat la: ',b:4:2);
readln;
end.
uses crt;
var a,b,c:real;
begin
clrscr;
write('nhap chieu cao cua ban thu 1:'); readln(a);
write('nhap chieu cao cua ban thu 2:'); readln(b);
write('nhap chieu cao cua ban thu 3:'); readln(c);
nn:=a;
if nn>b then nn:=b;
if nn>c then nn:=c;
writeln('ban co chieu cao thap nhat la: ',nn);
readln;
end.
program chieu_cao;
uses crt;
var a,b,c:integer;
begin
clrscr;
write('nhap bn thu nhat');readln(a);
write('nhap bn thu hai:');readln(b);
write('nhap bn thu ba:');readln(c);
if (a<b) and (a<c) then writeln('bn thu nhat thap nhat')
if (b<c) and (b<a) then writeln('bn thu hai thap nhat')
else writeln('bn thu ba thap nhat');
readln
end.
OK
uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
if a[i] mod 2=0 then t:=t+a[i];
writeln(t);
readln;
end.