hjhffff
08.05.2022 19:32

Складання програм на обчислення логічних виразів з використанням простих та складних умов. задача: Перевірити якій чверті належить точка з заданними координатами.
Врахувати осі координатної площини.
кто не знает не пишите

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
deluxe135
11.07.2021 16:00

Program velobike;

Uses crt,graph;

Var gr:integer;

gm:integer;

x,y:integer;

begin

gr:=detect;

initgraph(gr,gm,'..\bgi');

x:=600;

y:=250;

repeat

for x:=0 to 600 do

begin

cleardevice;

setbkcolor(8);

setcolor(2);

setlinestyle(1,0,1);

rectangle(1,3,639,475);

setfillstyle(1,6);

bar(2,280,638,475);

setcolor(6);

setfillstyle(1,2);

circle(x-150,y,27);

floodfill(x-140,y-10,6);

setcolor(yellow);

circle(x-150,y,3);

setcolor(6);

setfillstyle(1,2);

circle(x-0,y,27);

floodfill(x-0,y-10,6);

setcolor(yellow);

circle(x-0,y,3);

setcolor(yellow);

circle(x-70,y,10);

circle(x-70,y,2);

setcolor(yellow);

arc(x-150,y,355,190,30);

arc(x-0,y,445,200,30);

setcolor(2);

setlinestyle(0,0,2);

line(0,280,639,280);

setcolor(white);

setlinestyle(0,2,3);

moveto(x-110,y-50);

lineto(x-15,y-50);

moveto(x-150,y);

lineto(x-70,y);

lineto(x-10,y-35);

moveto(x-70,y);

lineto(x-110,y-50);

moveto(x-150,y);

lineto(x-110,y-50);

moveto(x-150,y);

lineto(x-170,y-35);

lineto(x-123,y-35);

moveto(x-0,y);

lineto(x-20,y-73);

lineto(x-40,y-60);

moveto(x-20,y-73);

lineto(x-12,y-90);

moveto(x-150,y);

lineto(x-180,y-10);

moveto(x-0,y);

lineto(x-30,y);

setcolor(6);

setlinestyle(0,0,1);

moveto(x-70,y);

lineto(x-55,y-20);

setcolor(red);

lineto(x-45,y-20);

setcolor(8);

moveto(x-70,y);

lineto(x-75,y+20);

setcolor(6);

lineto(x-85,y+20);

setcolor(6);

moveto(x-110,y-50);

lineto(x-115,y-63);

setcolor(red);

moveto(x-40,y-60);

lineto(x-50,y-60);

moveto(x-12,y-90);

lineto(x-22,y-90);

setcolor(red);

setlinestyle(0,0,3);

moveto(x-123,y-63);

lineto(x-103,y-63);

delay(10000);

end;

settextstyle(0,0,3);

cleardevice;

setcolor(red);

outtextxy(30,240,'XoTuTe IIocMoTpeTb eLLLe?');

outtextxy(100,280,'    Ha}|{MuTe Enter      ');

readln;

until keypressed;

readln;

closegraph;

end.

0,0(0 оценок)
Ответ:
WERDF342
28.12.2020 05:32

#include <iostream>

#include <vector>

#include <cstdint>

using namespace std;  template <class T>

istream& operator>>(istream &in, vector<T> &vec) {   for (auto &it : vec)     in >> it;   return in;

}  

template <class T>

ostream& operator<<(ostream &out, vector<T> &vec) {   for (auto &it : vec)     out << it << ' ';   return out;

}  

template <class T, class U>

istream& operator>>(istream &in, pair<T, U> &pair) {   in >> pair.first >> pair.second;   return in;

}  

template <class T, class U>

ostream& operator<<(ostream &out, pair<T, U> &pair) {   out << pair.first << ' ' << pair.second;   return out;

}

signed main(void) {     int32_t n; cin >> n;     vector<vector<int64_t>> a(n, vector<int64_t>(n,-1));     int64_t x = 0, y = n/2;     a[x][y] = 1;     for(int32_t i = 2; i <= n*n; ++i) {         int _x = x, _y = y;         if(!x) {             x =  n-1;         }         else {             --x;         }         if(y == n-1) {             y = 0;         }         else {             ++y;         }         if(a[x][y] != -1) {             x= _x, y = _y;             while(a[x][y] != -1) {                 if(x == n-1) {                     x = 0;                 }                 else {                     ++x;                 }             }         }         a[x][y] = i;     }     for(int32_t i = 0; i < n; ++i) {         cout << a[i] << '\n';     }     return 0;  }

Объяснение:

Запишем на C++ то, что написано в условии.

Если надо, то код также прикрепил в виде файла

Списывать не хорошо)

Если повезёт увидемся в (СИРИУС)

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