Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  ad
Language: C/C++
Code:
program asd;
uses crt;
var a,b,e,f,g : integer;
var d,i : Array[0..3] of integer;
begin
clrscr;
write('Ievadi 4 ciparu skaitli: ');
readln(a);
e:= 1;
for b:=0 to 3 do
begin
        g:=3-b;
        for f:=1 to g do e:=e*10;
        i[b]:= a div e;
        if b<>0 then
        begin
                d[b]:=i[b]-i[b-1]*10;
        end
        else d[b]:=i[b];
        e:=1;
end;
clrscr;
write('Apgriezts skaitlis: ');
for b:=3 downto 0 do write(d[b]);
readln;
end.

          
Comments: