Сравнить коммиты

..

2 Коммитов

Автор SHA1 Сообщение Дата
Lubov (IlintsevaLv) a48a92531a build: add biblio
2 лет назад
Lubov (IlintsevaLv) db1e4cbf09 code: change input
2 лет назад

@ -4,6 +4,7 @@
#include "histogram.h"
#include "text.h"
#include "svg.h"
#include <curl/curl.h>
using namespace std;
struct Input{
@ -12,30 +13,47 @@ struct Input{
};
Input
input_data()
input_data(istream& in,bool promt)
{
if (promt){
size_t count; // âñå ÷èñëà
cerr << "Count= ";
cin >> count;
Input in;
in.numbers.resize(count);
Input rez;
rez.numbers.resize(count);
cerr << "numbers:";
for (size_t i = 0; i < count; i++)
{
cin >> in.numbers[i];
cin >> rez.numbers[i];
}
cerr << "Bin_count= ";
cin >> in.bin_count;
cin >> rez.bin_count;
return rez;
}
else{
size_t count; // âñå ÷èñëà
cin >> count;
return in;
Input rez;
rez.numbers.resize(count);
for (size_t i = 0; i < count; i++)
{
cin >> rez.numbers[i];
}
cin >> rez.bin_count;
return rez;
}
}
int main()
{
Input in = input_data();
curl_global_init(CURL_GLOBAL_ALL);
bool promt=true;
Input in = input_data(cin, promt);
auto bins=make_histogram(in.numbers,in.bin_count);
show_histogram_svg(bins); //,in.bin_count);
double sr = 0.0;
show_histogram_svg(bins,sr);
return 0;
}

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