<u>Скажи автора просто я так не пойму</u>
<span>Количество битов на один пиксель</span>
375,42 Гб есть _----------------------
<u>Pascal:</u>
var a:array [1..5] of integer;
i:integer;
begin
randomize;
for i:=1 to 5 do
begin
a[i]:=random(31)-15;
write (a[i]:4);
end;
writeln;
for i:=1 to 5 do
begin
a[i]:=a[i]*2;
write (a[i]:4);
end;
writeln;
readln;
end.
<u>C++:</u>
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
int a[5];
srand (time(NULL));
for (int i = 0; i<5; i++)
{
a[i] = rand()%15-15;
cout <<a[i] <<" ";
}
cout <<endl;
for (int i = 0; i<5; i++)
{
a[i]*=2;
cout <<a[i] <<" ";
}
return 0;
}
Program sum;
Var a,b,c,d,e,f:real;
Begin
Write ('число a='); Read (a);
Write ('число b='); Read (b);
Write ('число c='); Read (c);
d:=a+b+c;
e:=a*b*c;
f:=d/3;
WriteLn ('Сумма чисел=',d);
Writeln ('Произведение чисел=', e);
Writeln ('Среднее арифметическое чисел=', f);
end.