М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
barmeb11
barmeb11
04.02.2022 23:59 •  Информатика

Втетради нарисован дом вопрос: что ты видишь: дом или его графическую модель?

👇
Ответ:
поор2
поор2
04.02.2022
Географ модель потому что дом который ты видешь в реале это просто дом а в тетраде просто построение
4,5(32 оценок)
Открыть все ответы
Ответ:
Mihailkim2018
Mihailkim2018
04.02.2022

Код:

#include <iostream>

#include <string>

using namespace std;

void printArray(int** arr, size_t X, size_t Y) {

   for (size_t i = 0; i < X; ++i) {

       for (size_t j = 0; j < Y; ++j) {

           cout << arr[i][j] << " ";

       }

       cout << endl;

   }

}

int main() {

   size_t X, Y;

   cout << "Number of rows in the array: ";

   cin >> X;

   cout << "Elements in each row of the array: ";

   cin >> Y;

   int** arr = new int* [X];

   for (size_t i = 0; i < X; ++i) {

       arr[i] = new int[Y];

       cout << "#" << i + 1 << ": ";

       for (size_t j = 0; j < Y; ++j)

           cin >> arr[i][j];

   }

   size_t index;

   cout << "index to check the row for non-decreasing ordering: ";

   cin >> index;

   --index; // numbering from 1

   bool flag = 1;

   for (int i = 0; i < Y - 1; ++i) {

       if (!(arr[index][i] <= arr[index][i + 1])) {

           cout << "No, " << i + 1 << (i + 1 == 1 ? "st" : (i + 1 == 2 ? "nd" : (i + 1 == 3) ? "rd" : "th")) << " element (" << arr[index][i] << ") violates the non-decreasing ordering (" << arr[index][i] << " > " << arr[index][i + 1] << ").\n";

           flag = 0;

           break;

       }

   }

   if (flag)

       cout << "Yes, the specified row is ordered in non-decreasing order.\n";

   flag = 1;

   index = 1;

   cout << "index to check the column for non-increasing ordering: ";

   cin >> index;

   --index;

   flag = 1;

   for (int i = 0; i < X - 1; ++i) {

       if (!(arr[i][index] >= arr[i + 1][index])) {

           cout << "No, " << i + 1 << (i + 1 == 1 ? "st" : (i + 1 == 2 ? "nd" : (i + 1 == 3) ? "rd" : "th")) << " element (" << arr[i][index] << ") violates the non-increasing ordering (" << arr[i][index] << " < " << arr[i][index + 1] << ").\n";

           flag = 0;

           break;

       }

   }

   if (flag)

       cout << "Yes, the specified row is ordered in non-increasing order.\n";

}


Нужна с задачей! Буду рад за ! Задачу надо решить с С++. 12.141. Дан двумерный массив. Составить про
Нужна с задачей! Буду рад за ! Задачу надо решить с С++. 12.141. Дан двумерный массив. Составить про
Нужна с задачей! Буду рад за ! Задачу надо решить с С++. 12.141. Дан двумерный массив. Составить про
4,4(57 оценок)
Ответ:
Ксюша10012007
Ксюша10012007
04.02.2022


Program MassXY;
uses crt;
const n = 20;
var
  x,y:array [1..n] of real;
  i,k, maxnum, minnum:integer;
  max, min,temp: real;
begin
  k:=1;
  randomize;
  for i:=1 to n do
    begin
      x[i]:=random(101)-50;
      if (1<=x[i]) and (x[i]<=2) then
        begin
          y[i]:=x[i];
          k:=k+1;
        end;
    end;
  writeln('*** alphaues is thinking... ***');
  max:=y[1];
  maxnum:=1;
  min:=y[1];
  minnum:=1;
  for i:=1 to k do
    begin
      if max<y[i] then
        begin
          max:=y[i];
          maxnum:=i;
        end;
      if min>y[i] then
        begin
          min:=y[i];
          minnum:=i;
        end;      
    end;
    temp:=y[maxnum];
    y[maxnum]:=y[minnum];
    y[minnum]:=temp;
  writeln('Массив Y состоит из ',k,' элементов:');
  for i:=1 to k do
    write(y[i],'  ');
end.

Program MatrixP;
uses crt;
const n=10;
const m=8;
var
  p:array[1..n,1..m] of integer;
  sum:array[1..n] of integer;
  st:array[1..m] of integer;
  i,j,tempsum,min,max,minnum,maxnum : integer;
begin
  Randomize;
  {ввод и вывод матрицы}
  writeln('Начальная матрица:');
  for i:=1 to n do
    begin
      for j:=1 to m do
        begin
          p[i,j]:= Random(100);
          write(p[i,j]:5);
        end;
       writeln;
    end;
  writeln('*** alphaues is thinking... ***');
  {нахождение сумм строк}
  for i:=1 to n do  
    begin
      tempsum:=0;
      for j:=1 to m do
        tempsum:=tempsum+p[i,j];
      sum[i]:=tempsum;
    end;
  maxnum:=1;
  tempsum:=sum[1];
  for i:=1 to n do  
    if tempsum>sum[i] then
      begin
        tempsum:=sum[i];
        minnum:=i;
      end;  
  writeln('Min сумма в ',minnum,'-й строке: ',sum[minnum]);
  {нахождение max элемента матрицы}
  max:=p[1,1];
  for i:=1 to n do
    for j:=1 to m do
      begin
        if max<p[i,j] then max:=p[i,j];
        maxnum:=i;
      end;
  writeln('Max элемент ',max,' находится в ',maxnum,'-й строке');
  for j:=1 to m do
    begin
      st[j]:=p[maxnum,j];
      p[maxnum,j]:=p[minnum,j];
      p[minnum,j]:=st[j];
    end;
  {вывод матрицы}
  writeln('Результат:');
  for i:=1 to n do
    begin
      for j:=1 to m do
        begin
          write(p[i,j]:5);
        end;
       writeln;
    end;
 end.

Program Parabolas;
Uses Crt;
Var
  a, b, c, d, m, n, dis, x1, x2 : real;
begin
  writeln('Введите коэфициенты первой параболы');
  write('A=');readln(a);
  write('B=');readln(b);
  write('C=');readln(c);
  writeln('Введите коэфициенты второй параболы');
  write('D=');readln(d);
  write('M=');readln(m);
  write('N=');readln(n);
  writeln('*** alphaues is thinking... ***');
  if a=d then
    if b=m then
      if c=n then
        writeln('Параболы совпадают!')
      else
        writeln('Параболы не пересекаются!')
    else
      begin
        x1:=(c-n)/(b-m);
        writeln('Параболы пересекаются в 1-й точке: ',x1,' ',a*x1*x1+b*x1+c);
      end
  else
    begin
      dis:=(b-m)*(b-m)-4*(a-d)*(c-n);
      if dis>0 then
        begin
          x1:=((m-b)+sqrt(dis))/(2*(a-d));
          x2:=((m-b)-sqrt(dis))/(2*(a-d));
          writeln('Параболы пересекаются в 2-x точкax: ');
          writeln(x1,' ',a*x1*x1+b*x1+c);
          writeln(x2,' ',a*x2*x2+b*x1+c);
        end
      else
        if dis=0 then  
        begin
          x1:=(m-b)/(2*(a-d));
          writeln('Параболы пересекаются в 1-й точке: ',x1,' ',a*x1*x1+b*x1+c);
        end
        else writeln('Параболы не пересекаются!');
   end;
end.   

4,5(3 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ