диана2459
19.04.2022 14:12

Вопросы для размышления 1. Сформулируй правила записи арифметических действий на языке программирования.2. Какие приоритеты имеют арифметические действия при их выполнении? 3. Почему важно соблюдение правил применения арифметических действий?4. В чем разница между функциями int() и round ()?

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Arturiomajarbio
14.10.2021 06:24

Задание 1

#include <iostream>

using namespace std;

int main() {

int a, b;

cin >> a >> b;

cout << a - b;

}

Задание 2

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a;

cin >> a;

cout << pow(a, 2) << ' ' << pow(a, 3)<< ' ' << pow(a, 5);

}

Задание 3

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a;

cin >> a;

cout << "The next number for the number " << a << " is " << a + 1 <<"!\n" <<"The previous number for the number "<< a << " is " << a - 1 <<"!";

}

Задание 4

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a;

cin >> a;

cout << (3 * pow(a, 3) + 18 * pow(a, 2)) * a + 12 * pow(a, 2) - 5;

}

Задание 5

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a, b, c;

cin >> a >> b >> c;

cout << a % 7 << "\n" << b % 7 << "\n" << c % 7;

}

Задание 6

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a, b, c, a1, b1, c1;

cin >> a >> a1 >> b >> b1 >> c >> c1;

cout << a1 % (8 - a) << "\n" << b1 % (8 - b) << "\n" << c1 % (8 - c);

}

0,0(0 оценок)
Ответ:
mgatron
28.09.2022 18:03
Const m=4; n=15;
var
  i,j,j0: integer;
  a:array[1..m,1..n] of integer;
  jExit,iExit:Boolean;
begin
  Randomize;
  for i:=1 to m do begin
    writeln;
    for j:=1 to n do begin
      a[i,j]:=random(2);
      write(a[i,j]:2)
      end
    end;
  writeln;
  j:=0; jExit:=false;
  repeat
    j:=j+1; i:=1; iExit:=false;
    if a[i,j]=0 then begin
      repeat
        i:=i+1;
        if a[i,j]<>0 then iExit:=true
      until iExit or (i=m);
      if i=m then jExit:=true
      end
    until jExit or (j=n);
  if a[i,j]=0 then writeln('Нулевой столбец ',j)
  else writeln('Нет нулевых столбцов');
end.

Тестовый пример:

 0 1 1 1 1 0 1 0 1 0 0 0 0 0 1
 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0
 1 1 0 0 0 1 0 1 1 1 1 1 0 1 1
 1 1 1 0 1 0 1 0 0 1 0 1 0 1 0
Нулевой столбец 13
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота