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.
uses crt;
var a,b,i,j:integer;
st:string;
begin
clrscr;
repeat
write('Ban muon ve khong:'); readln(st);
if st='Yes' then
begin
write('Nhap chieu dai:'); readln(a);
write('Nhap chieu rong:'); readln(b);
for i:=1 to a do
begin
for j:=1 to b do
write('*');
writeln;
end;
end
else break;
until st='No';
readln;
end.
program text;
uses crt;
var i:integer;
a,b,c,ha,hb,hc,p,S:real;
X,Y:array[1..3] of integer;
Begin
clrscr;
Writeln('Nhap toa do cac dinh A, B, C:');
for i:= 1 to 3 do readln(X[i],Y[i]);
a:=sqrt(sqr(X[2]-X[3])+sqr(Y[2]-Y[3]));
b:=sqrt(sqr(X[1]-X[3])+sqr(Y[1]-Y[3]));
c:=sqrt(sqr(X[2]-X[1])+sqr(Y[2]-Y[1]));
p:= (a+b+c)/2;
S:= sqrt(p*(p-a)*(p-b)*(p-c));
Writeln('Dien tich cua tam giac la: ',S:0:4);
ha:=2*S/a;
hb:=2*S/b;
hc:=2*S/c;
writeln('ha = ',ha:0:2,' hb = ',hb:0:2,' hc = ',hc:0:2);
readln;
end.
uses crt;
var xa,ya,xb,yb,xc,yc,p,s,ab,bc,ac:real;
begin
clrscr;
readln(xa,ya,xb,yb,xc,yc);
ab:=sqrt(sqr(xa-xb)+sqr(ya-yb));
ac:=sqrt(sqr(xa-xc)+sqr(ya-yc));
bc:=sqrt(sqr(xb-xc)+sqr(yb-yc));
p:=(ab+bc+ac)/2;
s:=sqrt(p*(p-ab)*(p-ac)*(p-bc));
writeln(s:4:2);
readln;
end.
program im_14424;
uses crt;
var m: interger;
begin
clrscr;
write('Nhap vap so nguyen duong m: ');
readln(m);
if m>0 and m mod 2 = 0 then write('So nguyen duong m la so chan');
if m>0 and m mod 2 <> 0 then write('So nguyen duong m la so le);
if m<0 then write('m khum phai la so nguyen duong');
readln
end.
Var a:array[1..100] of integer;
i,s:integer;
Begin
For i:=1 to 100 do
Begin
Write('Nhap phan tu thu ',i,' = ');readln(a[i]);
If a[i] mod 2 <> 0 then s:=s+a[i];
End;
Write('Tong la ',s);
Readln;
End.