Есть ответ 👍

Переведите число 3278 по схеме n8 n2 n16

155
478
Посмотреть ответы 2

Ответы на вопрос:


327₈ = 011 010 111₂ = 11010111₂ = 1101 0111₂ = d7₁₆
333ч
4,6(54 оценок)

#include <iostream>

#include <vector>

using namespace std;

signed main() {

   int n,m,A;

   cin >> n >> m >> A;

   vector<vector<double>> a(n,vector<double>(m));

   for(int i = 0; i < n; i++)

       for(int j = 0; j < m; j++)

           cin >> a[i][j];

   vector<double> b(n,1);

   vector<bool> ok(n,false);

   for(int i = 0; i < m; i++)

       for(int j = 0; j < n; j++)

           if(a[j][i] < A){

               b[i] *= a[j][i];

               ok[i] = true;

           }

   for(int i = 0; i < b.size(); i++){

       if(!ok[i]) b[i] = 0;

       cout << b[i] << " ";

   }

}

Популярно: Информатика