В начале программы нужно написать
uses Robot;
Program massive (input, output);
type vector=array[1..10] of integer;
var I:integer;
z:vector;
begin
for I:=1 to 10 do
read (z[I]);
for I:=1 to 10 do
if z[I]<0 then z[I]:=z[i]*(-1);
for I:=1 to 1o do
write (z[I], ' ');
end.
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
const int n = 4;
int a;
int mas[n][n];
srand(time(NULL));
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
a = rand() % 11 - 5 ;
mas[i][j] = a;
cout.width(3);
cout <<mas[i][j] <<" ";
}
cout <<endl;
}
cout <<endl;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (mas[i][j]<0){
mas[i][j]=mas[i][j]*mas[i][0];
}
cout.width(3);
cout <<mas[i][j] <<" ";
}
cout <<endl;
}
return 0;
}
1)
Тебе нужно найти N для ответа. А
Ответ: 16 цветов.
2)
160кб=163840 байт = 1310720
Ответ : 5 цветов
3)
Ответ : 256
..................................