Program so_dao_nguoc;
uses crt;
var i,n,dn:integer;
begin
clrscr;
write('nhap so n :');readln(n);
dn:=0;
repeat
dn:=dn+n mod 10;
n:=n div 10;
until a=0;
writeln('so dao nguoc cua n la :',dn);
readln;
end.
Program so_dao_nguoc;
uses crt;
var i,n,dn:integer;
begin
clrscr;
write('nhap so n :');readln(n);
dn:=0;
repeat
dn:=dn+n mod 10;
n:=n div 10;
until a=0;
writeln('so dao nguoc cua n la :',dn);
readln;
end.
Program so_dao_nguoc;
uses crt;
var i,n,dn:integer;
begin
clrscr;
write('nhap so n :');readln(n);
dn:=0;
repeat
dn:=dn+n mod 10;
n:=n div 10;
until a=0;
writeln('so dao nguoc cua n la :',dn);
readln;
end.
Program so_dao_nguoc;
uses crt;
var i,n,dn:integer;
begin
clrscr;
write('nhap so n :');readln(n);
dn:=0;
repeat
dn:=dn+n mod 10;
n:=n div 10;
until a=0;
writeln('so dao nguoc cua n la :',dn);
readln;
end.