Viết chương trình nhập vào số nguyê. In ra màn hình số đó có mấy kí tự số. 22/08/2021 Bởi Mary Viết chương trình nhập vào số nguyê. In ra màn hình số đó có mấy kí tự số.
uses crt; var n:longint; s:string; begin clrscr; write(‘Nhap n: ‘); readln(n); str(n,s); write(‘So ki tu cua n: ‘,length(s)); readln; end. Bình luận
$\text{Uses crt;}$ $\text{Var n:longint;}$ $\text{S:string;}$ $\text{Begin}$ $\text{Clrscr;}$ $\text{Write(‘Nhap n: ‘); readln(n);}$ $\text{Str(n,s);}$ $\text{Write(‘So ki tu cua n: ‘,length(s));}$ $\text{Readln;}$ $\text{End.}$ Bình luận
uses crt;
var n:longint;
s:string;
begin
clrscr;
write(‘Nhap n: ‘); readln(n);
str(n,s);
write(‘So ki tu cua n: ‘,length(s));
readln;
end.
$\text{Uses crt;}$
$\text{Var n:longint;}$
$\text{S:string;}$
$\text{Begin}$
$\text{Clrscr;}$
$\text{Write(‘Nhap n: ‘); readln(n);}$
$\text{Str(n,s);}$
$\text{Write(‘So ki tu cua n: ‘,length(s));}$
$\text{Readln;}$
$\text{End.}$