Маленькие поправки

master
DmitriyevDM 1 месяц назад
Родитель a3bc2607f3
Сommit 8bd08a8684

@ -3,8 +3,14 @@
using namespace std;
void find_minmax(const vector<double>& numbers, double& min, double& max) {
if (numbers.empty())
{
min = 0;
max = 0;
return;
}
max = numbers[0];
min = numbers[1];
min = numbers[0];
for (double x : numbers) {
if (x < min) min = x;
else if (x > max) max = x;

@ -32,7 +32,14 @@
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
<Unit filename="histogram.cpp" />
<Unit filename="histogram.h" />
<Unit filename="histogram_internal.h" />
<Unit filename="main.cpp" />
<Unit filename="svg.cpp" />
<Unit filename="svg.h" />
<Unit filename="text.cpp" />
<Unit filename="text.h" />
<Extensions>
<lib_finder disable_auto="1" />
</Extensions>

@ -2,6 +2,7 @@
#include <vector>
#include "histogram.h"
#include "text.h"
#include "svg.h"
using namespace std;
struct Input {
@ -29,6 +30,6 @@ Input input_data() {
int main() {
auto in = input_data();
auto bins = make_histogram(in.numbers, in.bin_count);
show_histogram_text(bins, in.bin_count);
show_histogram_svg(bins);
return 0;
}

Загрузка…
Отмена
Сохранить