Đăng nhập để hỏi chi tiết


Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
uses crt;
var n,d,s: integer;
begin
clrscr;
readln(n);
d:=0; s:=0;
while n<>0 do begin
d:=d+1;
s:=s+n mod 10;
n:=n div 10;
end;
write(d,' ',s);
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