Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* najveci zajednicki delilac *)
- MODULE najvzad;
- FROM InOut IMPORT WriteLn, WriteString, WriteCard, ReadCard;
- VAR m,n,i,c,max: CARDINAL;
- BEGIN
- WriteString('Unesite broj m: ');
- ReadCard(m);
- WriteLn;
- WriteString('Unesite broj n: ');
- ReadCard(n);
- WriteLn;
- IF m > n THEN
- c:=m;
- ELSE
- c:=n;
- END;
- FOR i:=1 TO c DO
- IF (m MOD i = 0) AND (n MOD i = 0) THEN
- max:=i;
- END;
- END;
- WriteString('najveci delilac je: ');
- WriteCard(max,0);
- WriteLn;
- END najvzad.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement