Advertisement
Guest User

Untitled

a guest
May 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.55 KB | None | 0 0
  1. program polydivisible;
  2. uses WinCrt;
  3. var
  4.  a,b,c,d,e,x,alf : Integer ;
  5. begin
  6.  repeat
  7.     ClrScr;
  8.     write('ekteb noumrou w ena n9ollek POLYDIVISIBLE wala le : ');
  9.     readln(x);
  10.  until x > 1000;
  11.  
  12.  e := 1000;
  13.  alf:=1000;
  14.  repeat
  15.   e:=e+alf;
  16.     if x - e >= alf*10 then
  17.     alf:=alf*10;
  18.  Until x-e < 1000 ;
  19.  e:=1;
  20.  d:=alf;
  21.  
  22.      repeat
  23.          e:=e+1;
  24.          d := d div 10 ;
  25.          write( '   EE:',e,'  DD:',d);
  26.      Until  (d= 1) or ( (x div d)mod e <> 0 );
  27.      writeln;
  28.  
  29.     writeln;
  30.     if d = 1 then
  31.      writeln('polydivisible')
  32.     Else
  33.      writeln('mouch polydivisible');
  34.  
  35. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement