program demchuso; uses crt; var d:byte; n:int64; begin clrscr; write(‘Nhap n: ‘); readln(n); d:=0; while n>0 do begin d:=d+1; n:=n div 10; end; write(‘Co ‘,d,’ chu so’); readln end. Bình luận
Uses crt;Var i,n,dem:longint;BeginClrScr;dem:=0;Write(‘Nhap so nguyen n: ‘); Readln(n);n:=abs(n);while n>0 DoBeginn := n div 10;dem:=dem+1;end;writeln(‘so n co ‘,dem,’ chu so’);Readln;End. Bình luận
program demchuso;
uses crt;
var d:byte;
n:int64;
begin
clrscr;
write(‘Nhap n: ‘); readln(n);
d:=0;
while n>0 do
begin
d:=d+1;
n:=n div 10;
end;
write(‘Co ‘,d,’ chu so’);
readln
end.
Uses crt;
Var i,n,dem:longint;
Begin
ClrScr;
dem:=0;
Write(‘Nhap so nguyen n: ‘); Readln(n);
n:=abs(n);
while n>0 Do
Begin
n := n div 10;
dem:=dem+1;
end;
writeln(‘so n co ‘,dem,’ chu so’);
Readln;
End.