var a,b,c: longint; function nod(a, b: longint): longint; begin while (a <> 0) and (b <> 0) do begin if a > b then a := a mod b else b := b mod a; nod := a + b; end; end; begin read(a,b,c); Writeln(nod(nod(a,b),c)); end.
{нахождение НОД} uses crt; var a, b, gcd: longint; begin cls; write('vvesti 2 chisla --> '); readln(a, b); while (a <> 0) and (b <> 0) do if a > b then a := a mod b else b := b mod a; gcd := a + b; writeln('НОД: ', gcd); readkey; end. оформи сама