AndrewGuyGuyson
03.04.2021 12:00

1. Төмендегі фигураны 3D модель түрінде салыңыз.​

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
ЧакН0рис
20.04.2021 17:05

#include <iostream>

#include <math.h>

#include <locale.h>

using namespace std;

void main()

{

setlocale(LC_ALL, "Russian");

int a=0, b=0;

bool pr;

while (a < 100)

{

 pr = false;

cout << "Введите координаты - x, y: ";

cin >> a >> b;

system("cls");

 for (int x = 1; x <= 3; x++)

 {

  for (int y = 6; y <= 8; y++)

  {

   if (a == x && b == y)

   {

    pr = true;

   }

  }

 }

 for (int x = 3; x <= 5; x++)

 {

  for (int y = 2; y <= 6; y++)

  {

   if (a == x && b == y)

   {

    pr = true;

   }

  }

 }

 for (int x = 5; x <= 7; x++)

 {

  for (int y = 6; y <= 8; y++)

  {

   if (a == x && b == y)

   {

    pr = true;

   }

  }

 }

 cout << pr << endl;

}

}

0,0(0 оценок)
Ответ:
Viktoria120t
13.09.2020 04:39
#include <iostream>
#include <conio.h>
#include <time.h>
using namespace std;

void main()
{
 srand(time(NULL));
 setlocale(0, "");
 int arr[17];
 int a, b, chet=0, nechet = 0;
cout << "Введите диапазон ." << endl << "Нижняя граница диапазона: "; cin >> a; cout << "Верхняя граница диапазона: "; cin >> b; cout << endl;
for (int i = 0; i < 17; ++i)
{
  arr[i] = a + rand() % (b-a+1);
  cout <<" "<<arr[i];
}
for (int i = 0; i < 17; ++i)
{
  if (arr[i] % 2 == 0) chet++;
 else nechet++;
} if (chet > nechet)
 cout << " \n Четных больше";
else if (nechet>chet)
 cout << "\n Нечетных больше";
else cout << "\n Одинаковое количество четных и нечетных";
 _getch();
}
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота