The Exam
to solve objecto-oriented programming,
that is. I need to resolve it within an hour I think, but it's better before 🙂
The task in the attached file.
(There is a short description, you need more information...) How much do you need it here?The ?
Applications 1
Client's review of cooperation with Nazar Semenishin
The ExamExcellent programmer, answered all questions quickly, the project was performed accurately with the task.
![]()
Freelancer's review of cooperation with client
The ExamEverything went well and quickly.
-
У меня вот так получилось
(но я использовал с++, потоковый ввод/вывод из файла и Файлы на диске "D". Что-то на подобие проходили?):
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ifstream in("D:\\input.txt", ios::in); //операция чтения
if (!in)
{
system("pause");
return 1;
}
string str;
int n, k;
in >> str;
n = atoi(str.c_str());
in >> str;
k = atoi(str.c_str());
//считывание массивов в один
int *A = new int[n + n];
for (int i = 0; i < n + n; i++)
{
in >> str;
A[i] = atoi(str.c_str());
}
in.close();
//сортировка
int temp;
for (int i = 0; i < n + n; i++)
{
for (int j = i + 1; j < n + n; j++)
{
if (A[i] > A[j])
{
temp = A[i];
A[i] = A[j];
A[j] = temp;
}
}
}
ofstream fout("D:\\output.txt"); //операция чтения
for (int i = 0; i < n + n; i++)
{
if (A[i] % k != 0)
{
fout << A[i] << " ";
}
}
fout.close();
//чтобы консоль не закрывалась
system("pause");
return 0;
}
-
Считывать из файла можно по-разному.
Надо применять, то что проходили на парах, тогда у преподавателя не будет лишних вопросах.
-
Current freelance projects in the category C & C++
Creation or refinement of firmware and logic for three autonomous LoRa stations based on ESP32.
113 USD
Creation or refinement of firmware and logic for three autonomous LoRa stations based on ESP32. The devices must set up a Wi-Fi access point, serve a local site via a browser (HTTP), receive text and images within a radius of 5-10 km (plus or minus), store data (preferably on… C & C++, C# ∙ 1 hour 18 minutes back ∙ 3 proposals |
Software development for Arduino (RF modules 3–7.5 GHz, automatic frequency scanning)It is necessary to develop a system on Arduino for the automatic search of active analog video signals and the automatic tuning of the transmitter to the detected frequency.It is planned to use three separate transceiver modules: 3000–4200 MHz; 4900–6000 MHz; 6100–7500… C & C++, Embedded Systems & Microcontrollers ∙ 23 hours 35 minutes back ∙ 4 proposals |
Black Ukraine (RP-project on base MTA)
1162 USD
|
Residential Proxy Infrastructure EngineerWe're building a residential proxy network from scratch — fully owned, no third-party suppliers. We need one exceptional network engineer to build the entire technical foundation. What you'll build: - Android background SDK that routes proxy traffic through user devices… C & C++, DevOps ∙ 6 days 19 hours back ∙ 13 proposals |
Improvement in the existing version of 1C retail block for the distribution center (DC)In general, I will explain what kind of database we have - There is a main server where there is a retail database (where all receipts are recorded) - a UTP database - where all sales are transferred - it calculates the markup and stock balances - small databases of retail… C & C++, C# ∙ 7 days 10 hours back ∙ 6 proposals |