ученый2222
27.09.2020 12:54

Які технології використовують в аграрному, індустріальному суспільстві. А які в інформаційному? Порівняйте.

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
irina030270
12.04.2022 21:55
Надеюсь без ошибок. Цену за отдельные аспекты назначте сами:

#include stdlib.h
#include <iostream>
using namespace std;

int main() {
setlocale(LC_ALL, "Russian");

int floor;
char lift, type0;
double price_floor;
double price_elevator;
double price_type;
double total_price;
bool elevator;

cout << "Введите номер этажа: ";
cin >> floor;

if (floor == 1 || floor <= 3) price_floor=1;
if (floor <= 6 && floor > 3) price_floor=2;
if (floor <= 9 && floor > 6) price_floor=3;
else if price_floor=4;

cout << "Имеется ли в вашем помещении лифт? "; //ответ + или -
cin >> lift;
switch (lift) {
case '+':
price_elevator=1;
elevator=true;
break;
case '-':
price_elevator=2;
break;
}

if (elevator) {
cout << "Грузоподъемный? ";
cin >> type0;
switch (type0) {
case '+':
price_type=1
break;
case '-':
price_type=2;
break;
}
}
else if cout <<"\n";
cout <<"\n";
total_price=price_elevator + price_floor + price_type;
cout << "Конечная цена: " << total_price <<endl;
system ("pause");
return 0;
}
0,0(0 оценок)
Ответ:
дашуля298
25.01.2020 17:48

using System;


namespace App {

    class Program {

        static void Main(string[] args) {

            int n = Convert.ToInt32(Console.ReadLine());

            int[] a = new int[n];

            int[] b = new int[0];

            Random rand = new Random();

            for (int i = 0; i < n; i++) {

                a[i] = rand.Next(0, 11);

                Console.Write(a[i] + " ");

            }

            int num= Int32.MaxValue;

            Array.Sort(a); Console.WriteLine();

            for (int i = 0; i < n; i++) {

                if (a[i] != num) {

                    int c = 0;

                    for (int j = i; j < n; j++) if (a[i] == a[j]) { c++; num = a[i]; }

                    if (c <= 2) {

                        Array.Resize(ref b, b.Length + 1);

                        b[b.Length - 1] = a[i];

                    }

                }

            }

            for (int i = 0; i < b.Length; i++) Console.Write(b[i] + " ");

            

            Console.ReadKey();

        }

    }

}

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