9
3
Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
296
144
var x,y,d,res,i,j:longint;
begin
assign(input,'b3.inp'); reset(input);
assign(output,'b3.out'); rewrite(output);
read(x,y);
if ((x<4) or (x>52) or (y<60) or (y>121)) then
begin
writeln('Thong so khong hop le');
exit;
end;
for i:=x to y do
begin
if i mod 3 = 0 then
begin
write(i,' ');
inc(d);
end;
end;
writeln;
writeln(d);
for j:=x+1 to y-1 do
begin
if trunc(sqrt(j))=sqrt(j) then
begin
write(j,' ');
inc(res);
end;
end;
writeln;
writeln(res);
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
uses crt;
var x,y,i:integer;
begin
clrscr;
while true do
begin
readln(x);
if x in[4..53] then break;
end;
while true do
begin
readln(y);
if y in[59..121] then break;
end;
for i:=x to y do
if (i mod 2=0) and(i mod 3=0) then write(i,' ');
writeln;
for i:=x to y do
if trunc(sqrt(i))=sqrt(i) then write(i,' ');
readln
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin