Var a,b,c,d,e,m1,m2,m3,ITOG:integer;
Procedure nod(x,y:integer;var n:integer);
Begin
If x=y then n:=x
else
if x>y then NOD(x-y, y, n)
Else NOD(x, y-x, n);
end;
begin
read (a,b,c,d,e);
nod(a,b,m1);
nod(c,d,m2);
nod(m1,m2,m3);
nod(m3,e,ITOG);
writeln (ITOG);
end.
Пример:
90 135 45 315 75
15
Program test;
<span>var n: integer; </span>
<span>begin </span>
<span>writeln(' n = '); read(n); </span>
<span>writeln(' сотен = ' , n div 100); </span>
<span>end; </span>
#include <iostream>
using namespace std;
int main () {
int digit = 300;
do {
int sum = 0;
int teiler = 1;
while (teiler <= digit)
<span> {</span>
if (digit % teiler == 0)
<span> sum+=teiler;</span>
<span> teiler++;</span>
<span> }</span>
if(sum % 10 == 0)
<span> {</span>
cout << digit << endl;
<span> }</span>
<span> digit++;</span>
<span> } </span>while (digit <= 600);
return 0;
}
<span>
</span>
1) Г
2)в
3)г
4) в
..............................................