Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program polydivisible;
- uses WinCrt;
- var
- a,b:longint;
- procedure saisie(var a,b:LongInt);
- begin
- repeat
- write('a=');
- readln(a);
- write('b=');
- readln(b);
- until (a>=100) AND (a<b);
- end;
- Procedure affiche(a,b:longint);
- var c:byte;
- i,x:longint;
- e:integer;
- chi,chicopy:string;
- nonpoly:Boolean;
- Begin
- for i:=a to b do
- begin
- str(i,chi);
- c:=2;
- repeat
- val(copy(chi,1,c),x,e);
- if x mod c = 0 then
- begin
- c:=c+1;
- nonpoly:=false;
- end
- else nonpoly:=true;
- until (c > length(chi)) OR nonpoly;
- if c > length(chi) then writeln(chi);
- end;
- end;
- begin
- saisie(a,b);
- affiche(a,b);
- end.
Advertisement
Advertisement
Advertisement
RAW Paste Data
Copied
Advertisement