#include <iostream>
using namespace std;
int main()
{
int sum=1;
int arr[10]=(1,2,3,4,5,6,7,8,9,10);
for(int i=0;i<10;i++)
sum=sum*arr[i];
cout<<"Sum : = "<<sum<<endl;
system("pause");
return 0;
}
var a,b,i,z,x:integer;
q:array [1..20] of integer;
begin
z:=1;
for i:=1 to 20 do
q[i]:=random(18)+2;
write(q[i],' ');
if (i<11) then z:=z*q[i];
end;
writeln;
write('Произведение от 1 до 10 = ',z);
end.
#include <iostream>
using namespace std;
int main()
{
int sum=1;
int arr[10]=(1,2,3,4,5,6,7,8,9,10);
for(int i=0;i<10;i++)
sum=sum*arr[i];
cout<<"Sum : = "<<sum<<endl;
system("pause");
return 0;
}
var a,b,i,z,x:integer;
q:array [1..20] of integer;
begin
z:=1;
for i:=1 to 20 do
begin
q[i]:=random(18)+2;
write(q[i],' ');
if (i<11) then z:=z*q[i];
end;
writeln;
write('Произведение от 1 до 10 = ',z);
end.