uses crt;
var a,b,c:longint;
function demcs(a:longint):byte;
var dem:byte;
begin
dem:=0;
while a<>0 do
begin
dem:=dem+1;
a:=a div 10;
end;
demcs:=dem;
end;
begin
clrscr;
write('nhap so thu nhat:');readln(a);
while demcs(a)<> 3 do
begin
write('nhap lai so thu nhat thoa man so gom 3 chu so:');
readln(a);
end;
write('nhap so thu hai:');readln(b);
while demcs(b)<>3 do
begin
write('nhap lai so thu hai thoa man so gom 3 chu so:');
readln(b);
end;
writeln(a:10);
writeln('x':8);
writeln(b:10);
writeln('-----------':13);
writeln(b mod 10 *a:10);
writeln(b div 10 mod 10 *a:9);
writeln(b div 100*a:8);
writeln('-----------':13);
c:=a*b;
writeln(c:10);
readln;
end.
Đúng 0
Bình luận (0)