18 Ekim 2009 Pazar

Pascalda Obeb Bulma, Pascal Obeb Programı

program obeb_;
uses crt;
var
obeb, a, b, i: integer;
c,d:real;
begin
clrscr;
writeln('1. sayıyı giriniz='); readln(a);
writeln('2. sayıyı giriniz='); readln(b);
if awhile obeb=0 do
begin
if (a mod i=0) and (b mod i=0) then
obeb:= i;
i:=i-1;
end;
writeln('obeb=', obeb);
readln;
end.

Hiç yorum yok:

Yorum Gönder