code:test[4]
Этот коммит содержится в:
17
Lab1.cbp
17
Lab1.cbp
@@ -13,7 +13,11 @@
|
|||||||
<Option compiler="gcc" />
|
<Option compiler="gcc" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-g" />
|
<Add option="-g" />
|
||||||
|
<Add directory="include" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add option="-static-libstdc++" />
|
||||||
|
</Linker>
|
||||||
</Target>
|
</Target>
|
||||||
<Target title="Release">
|
<Target title="Release">
|
||||||
<Option output="bin/Release/Lab1" prefix_auto="1" extension_auto="1" />
|
<Option output="bin/Release/Lab1" prefix_auto="1" extension_auto="1" />
|
||||||
@@ -22,6 +26,7 @@
|
|||||||
<Option compiler="gcc" />
|
<Option compiler="gcc" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-O2" />
|
<Add option="-O2" />
|
||||||
|
<Add directory="include" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add option="-s" />
|
<Add option="-s" />
|
||||||
@@ -32,7 +37,19 @@
|
|||||||
<Add option="-Wall" />
|
<Add option="-Wall" />
|
||||||
<Add option="-fexceptions" />
|
<Add option="-fexceptions" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
|
<Unit filename="histogram.cpp">
|
||||||
|
<Option target="Debug" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="histogram.h">
|
||||||
|
<Option target="Debug" />
|
||||||
|
</Unit>
|
||||||
<Unit filename="main.cpp" />
|
<Unit filename="main.cpp" />
|
||||||
|
<Unit filename="text.cpp">
|
||||||
|
<Option target="Debug" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="text.h">
|
||||||
|
<Option target="Debug" />
|
||||||
|
</Unit>
|
||||||
<Extensions>
|
<Extensions>
|
||||||
<lib_finder disable_auto="1" />
|
<lib_finder disable_auto="1" />
|
||||||
</Extensions>
|
</Extensions>
|
||||||
|
|||||||
7106
doctest.h
Обычный файл
7106
doctest.h
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -26,7 +26,7 @@ std::vector<size_t> make_histogram(std::vector<double> numbers, size_t bin_count
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void find_minmax(std::vector<double> numbers, double& min, double& max) {
|
void find_minmax(std::vector<double> numbers, double& min, double& max) {
|
||||||
min = numbers[0];
|
min = numbers[0];
|
||||||
max = numbers[0];
|
max = numbers[0];
|
||||||
for (double number : numbers) {
|
for (double number : numbers) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
static void find_minmax(std::vector<double> numbers, double& min, double& max);
|
void find_minmax(std::vector<double> numbers, double& min, double& max);
|
||||||
std::vector<size_t> make_histogram(std::vector<double> numbers, size_t bin_count);
|
std::vector<size_t> make_histogram(std::vector<double> numbers, size_t bin_count);
|
||||||
|
|
||||||
#endif // HISTOGRAM_H_INCLUDED
|
#endif // HISTOGRAM_H_INCLUDED
|
||||||
|
|||||||
9
main.cpp
9
main.cpp
@@ -9,12 +9,8 @@ struct Input {
|
|||||||
size_t bin_count{};
|
size_t bin_count{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Input input_data();
|
Input input_data();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -23,11 +19,6 @@ int main()
|
|||||||
show_histogram_text(bins, in.bin_count);
|
show_histogram_text(bins, in.bin_count);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Input input_data() {
|
Input input_data() {
|
||||||
Input input_struct;
|
Input input_struct;
|
||||||
size_t countOfNumbers;
|
size_t countOfNumbers;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user