Bài 25:
program demso;
uses crt;
var n:longint;
d:word;
begin
clrscr;
write('Nhap so : '); readln(n);
d:=0;
while n mod 10=0 then
begin
d:=d+1;
n:=n div 10;
end;
write('Co ',d,' chu so 0 tan cung');
readln;Bài 25:
end.
Bài 26:
program tamgiacduoi;
uses crt;
var h,i,j:integer;
begin
clrscr;
write('Nhap do cao cua tam giac'); readln(h);
for i:=1 to h do
begin
for j:=1 to h-i do write(' ');
for j:=1 to i do write('*');
writeln;
end;
readln;
end.
Bài 27:
program tamgiactren;
uses crt;
var h,i,j:integer;
begin
clrscr;
write('Nhap do cao h: ); readln(h);
for i:=1 to h do
begin
for j:=1 to i-1 do write(' ');
for j:=1 to h-i+1 do write('*');
writeln;
end;
readln;
end.