#include <iostream>
using std::cout;
using std::endl;
#include <cstdlib>
using std::rand;
using std::srand;
#include <ctime>
using std::time;
int main()
{
int a[12];
for(int i = 0; i < 12; i++)
{
a[i] = rand() % 21;
cout << a[i] << ' ';
}
cout << endl;
int temp;
for(int i = 0, j = 11; i < j; i++, j--)
{
temp = a[i];
a[i] = a[j];
a[j] = temp;
}
for(int i = 0; i < 12; i++)
{
cout << a[i] << ' ';
}
cout << endl;
return 0;
}
Самый простой перевода из двоичной в десятичную
2x0+1=1 (где 1 это первый бит слева)
2х1+0=2
2x2+0=4
2x4+0=8
2x8+0=16
2x16+1=33
2x33+1=67
2x67+1=135
ответ 135