vasearu
?>

Переведите числа в двоичную и десятичную системы:A) 20010= X2 Б) 110012= X10​

Информатика

Ответы

sarycheva659

200_{10} = X_{2}

200 - 128 = 72

72 - 64 = 8

8 - 8 = 0

200_{10} = (128 + 64 + 8)_{10} = (10000000 + 1000000 + 1000)_{2} = 11001000_2

ответ: 11001000_2

11001_{2} = X_{10}

1 \cdot 2^{4} + 1 \cdot 2^{3} + 0 \cdot 2^{2} + 0 \cdot 2^{1} + 1 \cdot 2^{0} =

= 16 + 8 + 1 = 25

ответ: 25

eronch
#include <stdio.h>#include <stdlib.h>#include <conio.h>
/* main program fucntion */void main(){  int     iMatrSize, // size of the matrix    iSum = 0,  // sum of the nessesary elements of the matrix    iCnt = 0,  // number of the nessesary elements of the matrix    **aMatr;   // the matrix  int i, j;
  scanf_s("%i", &iMatrSize);
  /* allocation memory for the array */  aMatr = (int**)malloc(sizeof(int) * iMatrSize);  for (i = 0; i < iMatrSize; i++)  {    aMatr[i] = (int*)malloc(sizeof(int) * iMatrSize);  }
  /* filling in the array */  for (i = 0; i < iMatrSize; i++)    for (j = 0; j < iMatrSize; j++)      aMatr[i][j] = rand() % 21 - 10;
  /* counting the sum of the elements */  for (i = 0; i < iMatrSize; i++)    for (j = 0; j < iMatrSize - i - 1; j++)      iSum += aMatr[i][j], iCnt++;
  /* outputing the array */  for (i = 0; i < iMatrSize; i++)  {    for (j = 0; j < iMatrSize; j++)      printf ("%3i ", aMatr[i][j]);    printf("\n");  }
  printf("Sum = %f\n", (float)iSum / iCnt);
  _getch();} /* End of 'main' function */
yorestov
var
  x: string;
  arr: array of char;

begin
  readln(x);
  arr := x.Split(' ')[1].ToCharArray();
  System.Array.Reverse(arr);
  writeln(length(arr), '   ', new string(arr));
end.

var
  c: array of integer := (10, 20, 10, 30, 40, 50, 55, 1, 5, 9, 4, 3, 2);
  r, q, s: real;
  i, a, b: byte;
  
begin
  q := 1;
  i := 1;
  r := c.Min();
  while (i < length(c)) do
  begin
    q *= c[i];
    i += 2;
  end;
  readln(a, b);
  s := b - a - 1;
  writeln('T = ', (R / Q + 1) + S);
end.

const
  k = 5;
  p = 5;

var
  f: array [1..k, 1..p] of string;
  o: real;
  df: byte;

begin
  for i: byte := 1 to k do
  begin
    for j: byte := 1 to p do
    begin
      f[i, j] := random(10, 99).ToString();
      write(f[i, j]:3);
      if (j >= 7 - i) then
      begin
        o += integer.Parse(f[i, j]);
        df += 1;
        f[i, j] := '██';
      end;
    end;
    writeln();
  end;
  writeln();
  for i: byte := 1 to k do
  begin
    for j: byte := 1 to p do
      write(f[i, j]:3);
    writeln();
  end;
  writeln(o / df);
end.

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Переведите числа в двоичную и десятичную системы:A) 20010= X2 Б) 110012= X10​
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

chetverikovalex3738
Vladimir-Tamara1359
Irina1435
Кирилл-Анна1023
Ольга1520
Vladimirovna1858
федороа
sohrokova809
smnra219
fedorenkoroman
snk7777202
Камочкин
irinanikulshina144
npprang21
osechkinandrejj