В
Все
М
Математика
А
Английский язык
Х
Химия
Э
Экономика
П
Право
И
Информатика
У
Українська мова
Қ
Қазақ тiлi
О
ОБЖ
Н
Немецкий язык
Б
Беларуская мова
У
Українська література
М
Музыка
П
Психология
А
Алгебра
Л
Литература
Б
Биология
М
МХК
О
Окружающий мир
О
Обществознание
И
История
Г
Геометрия
Ф
Французский язык
Ф
Физика
Д
Другие предметы
Р
Русский язык
Г
География

Напешите на языке Python


Напешите на языке Python

Показать ответ
Ответ:
sladenykaya136
sladenykaya136
06.12.2020 10:09

--- C# 7.3 ---

using System;

using System.Collections.Generic;

using System.Linq;

namespace CSLear

{

   class Program

   {

       private const int stdRow = 5;

       private const int stdCols = 6;

       static void Main(string[] args)

       {

           int[,] Arr = new int[stdRow, stdCols];

           ArrayRandomize(ref Arr, stdRow, stdCols);

           RemoveFirstRow(ref Arr, stdRow, stdCols);

           Console.ReadKey();

       }

       public static void RemoveFirstRow<T>(ref T[,] Matr, int ArrRows, int ArrCols)

       {

           T[,] Temp = new T[ArrRows-1,ArrCols];

           for (int i = 1; i < ArrRows; i++)  

           {

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

               {

                   Temp[i - 1, j] = Matr[i, j];

               }

           }

           Matr = Temp;

       }

       public static void ArrayRandomize(ref int[,] Arr, int ArrRows, int ArrCols)

       {

           Random r = new Random();

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

           {

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

               {

                   Arr[i, j] = r.Next(-99, 99);

               }

           }

       }

   }

}

Объяснение:

0,0(0 оценок)
Ответ:
ира1288
ира1288
06.01.2021 22:15

Объяснение:

clrscr;

s:=0;

writeln('Vvedite tovarooborot po vidam:');

for i:=1 to 4 do

 begin

  write(x[i],'=');

  readln(y[i]);

  s:=s+y[i];

 end;

for i:=1 to 4 do

y[i]:=y[i]*100/s;

dr:=detect;

initgraph(dr,mode,'');

xc:=GetMaxX div 2;

yc:=GetMaxY div 2;

outtextxy(Xc-80,20,'Tovarooborot po vidam, %');

b:=round(360*y[1]/100);

r:=150;

setcolor(10);

setfillstyle(1,11);

pieslice(xc,yc,0,b,r);

for i:=2 to 3 do

 begin

  a:=round(360*y[i]/100)+b;

  setcolor(10+i);

  setfillstyle(1,10+i);

  pieslice(xc,yc,a,b,r);

  b:=a;

 end;

setcolor(14);

setfillstyle(1,14);

pieslice(xc,yc,b,360,r);

for i:=1 to 4 do

 begin

  setcolor(i+10);

  setfillstyle(1,i+10);

  bar(xc+150,i*40,xc+180,i*40+20);

  setcolor(15);

  str(y[i]:0:2,st);

  outtextXY(xc+190,i*40+5,x[i]+'-'+s

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