obizyana88
24.10.2021 21:07

Потреба у зміні формату медіафайлів виникає через те, що: 

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
alfiea7
31.03.2022 22:13
Uses GraphABC;
var a,b,c:array[10..99] of integer;
 ast,bst,cst:string;
 i:integer;
begin
ast:='A:';
bst:='Б:';
cst:='В:';
for i:=10 to 99 do
begin
c[i]:=i;
a[i]:=c[i]-i+random(50);
b[i]:=c[i]-a[i];
ast:=ast+' '+inttostr(a[i]);
bst:=bst+' '+inttostr(b[i]);
cst:=cst+' '+inttostr(c[i]);
end;
setpencolor(clRed);
line(0,0,150,0);
line(150,0,75,50);
line(75,50,0,0);
rectangle(0,50,150,300);
DrawTextCentered(0,50,150,300,ast);
setpencolor(clYellow);
line(150,0,300,0);
line(300,0,225,50);
line(225,50,150,0);
rectangle(150,50,300,300);
DrawTextCentered(150,50,300,300,bst);
setpencolor(clGreen);
line(300,0,450,0);
line(450,0,375,50);
line(375,50,300,0);
rectangle(300,50,450,300);
DrawTextCentered(300,50,450,300,cst);
end.
0,0(0 оценок)
Ответ:
135790246anna
19.03.2023 10:05
//Dev-C++ 5.11

#include <iostream>
using namespace std;

int main(void)
 {const int n=3;
 const int m=3;
 int ma[n][m];
 int c;
 cout<<"First matrix"<<endl;
 for(int i=0;i<n;i++)
  {for(int j=0;j<m;j++)
   {ma[i][j]=i+j;
   cout<<ma[i][j]<<" ";}
  cout<<endl;}
 for(int i=0;i<n/2;i++){
  for(int j=0;j<m;j++)
   {c=ma[i][j];
   ma[i][j]=ma[n-i-1][j];
   ma[n-1-i][j]=c;}}
 cout<<"Final matrix"<<endl;
 for(int i=0;i<n;i++)
  {for(int j=0;j<m;j++)
   cout<<ma[i][j]<<" ";
  cout<<endl;}
 return 0;
}

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