main
LatyshevGI 1 неделю назад
Родитель dfe74bcb26
Сommit 518ab2b6b5

1
.gitignore поставляемый

@ -5,3 +5,4 @@
/main.o
/main.exe
/unittest.layout
/curl

@ -1,30 +1,31 @@
#include <curl/curl.h>
#include "histogram.h"
#include "text.h"
#include "svg.h"
struct Input {
vector<double> vec;
size_t korz{};
};
Input input_data(istream& in, bool prompt = false) {
Input input_data(istream& in, bool promt = false) {
Input lin;
size_t n, korz;
if(prompt)
cerr << "Number of elements: ";
if(promt)
cerr << "Number of elem ";
in >> n;
lin.vec.resize(n);
for (size_t i = 0; i < n; i++)
in >> lin.vec[i];
if(prompt)
if(promt)
cerr << "Enter bin count: ";
in >> lin.korz;
return lin;
}
int main() {
auto in = input_data(cin, true);
curl_global_init(CURL_GLOBAL_ALL);
auto in = input_data(cin);
auto bins = make_histogram(in.korz, in.vec);
show_histogram_svg(bins);
}

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