Advertisement
Racknoss

function Strongpoint

May 28th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.43 KB | None | 0 0
  1. function Strongpoint(a:int64):integer;
  2. var b, fix:int64;
  3. bo:boolean;
  4. begin
  5. repeat
  6. fix:=1;
  7. b:=b+1;
  8. if (a div 10000>0) then fix:=fix*(a div 10000);
  9. if ((a mod 10000) div 1000>0) then fix:=fix*((a mod 10000) div 1000);
  10. if ((a mod 1000) div 100>0) then fix:=fix*((a mod 1000) div 100);
  11. if ((a mod 100)div 10>0) then fix:=fix* ((a mod 100)div 10);
  12. fix:=fix*(a mod 10);
  13. if a=fix then bo:=true;
  14. a:=fix;
  15. until (bo=true);
  16. Result:=b;
  17. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement