program armstcislo;
uses Crt;
var a,za,s,pc : integer;
begin
  clrscr;
  writeln('Zadaj cislo o ktorom chces vediet ci je Armstrongove:');
  readln(a);
  s:=0;
  za:=a;
  while a<>0 do begin
    pc:=a mod 10;
    s:=s+pc*pc*pc;
    a:=a div 10;
  end;
  if za=s then writeln('Cislo je Armstrongove.')
    else writeln('Cislo nie je Armstrongove.');
  readln;
end.
