main
LiTekho 2 лет назад
Родитель f955200038
Сommit 351d7655e0

@ -8,10 +8,47 @@
#include "svg.h" #include "svg.h"
using namespace std; using namespace std;
const size_t SCREEN_WIDTH = 80;
const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1;
struct Input
{
vector<double> numbers;
size_t bin_count{};
};
Input
input_data(istream& in){
cerr << "Input numbers count: ";
size_t number_count;
in >> number_count;
Input ik;
ik.numbers.resize(number_count);
cerr << "Input numbers: ";
for (size_t i = 0; i < number_count; i++)
{
cin >> ik.numbers[i];
}
cerr << "Input bin count: ";
cin>> ik.bin_count;
return ik;
}
int main()
{
Input in = input_data(cin);
auto bins = make_histogramm(in.numbers, in.bin_count);
show_histogram_svg(bins);
return 0;
}
/*
struct Input struct Input
{ {
vector<double> numbers; vector<double> numbers;
@ -47,4 +84,4 @@ int main()
show_histogram_svg(bins); show_histogram_svg(bins);
return 0; return 0;
} }*/

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