Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program polydivisible;
- uses WinCrt;
- var
- a,b,c,d,e,x,alf : Integer ;
- begin
- repeat
- ClrScr;
- write('ekteb noumrou w ena n9ollek POLYDIVISIBLE wala le : ');
- readln(x);
- until x > 1000;
- e := 1000;
- alf:=1000;
- repeat
- e:=e+alf;
- if x - e >= alf*10 then
- alf:=alf*10;
- Until x-e < 1000 ;
- e:=1;
- d:=alf;
- repeat
- e:=e+1;
- d := d div 10 ;
- write( ' EE:',e,' DD:',d);
- Until (d= 1) or ( (x div d)mod e <> 0 );
- writeln;
- writeln;
- if d = 1 then
- writeln('polydivisible')
- Else
- writeln('mouch polydivisible');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement