build: add biblio
Этот коммит содержится в:
27
main.cpp
27
main.cpp
@@ -4,6 +4,7 @@
|
|||||||
#include "histogram.h"
|
#include "histogram.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "svg.h"
|
#include "svg.h"
|
||||||
|
#include <curl/curl.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
struct Input{
|
struct Input{
|
||||||
@@ -12,8 +13,9 @@ struct Input{
|
|||||||
};
|
};
|
||||||
|
|
||||||
Input
|
Input
|
||||||
input_data(istream& in)
|
input_data(istream& in,bool promt)
|
||||||
{
|
{
|
||||||
|
if (promt){
|
||||||
size_t count; // âñå ÷èñëà
|
size_t count; // âñå ÷èñëà
|
||||||
cerr << "Count= ";
|
cerr << "Count= ";
|
||||||
cin >> count;
|
cin >> count;
|
||||||
@@ -28,15 +30,30 @@ input_data(istream& in)
|
|||||||
|
|
||||||
cerr << "Bin_count= ";
|
cerr << "Bin_count= ";
|
||||||
cin >> rez.bin_count;
|
cin >> rez.bin_count;
|
||||||
|
|
||||||
return rez;
|
return rez;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
size_t count; // âñå ÷èñëà
|
||||||
|
cin >> count;
|
||||||
|
|
||||||
|
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()
|
int main()
|
||||||
{
|
{
|
||||||
Input in = input_data(cin);
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
bool promt=true;
|
||||||
|
Input in = input_data(cin, promt);
|
||||||
auto bins=make_histogram(in.numbers,in.bin_count);
|
auto bins=make_histogram(in.numbers,in.bin_count);
|
||||||
double ttt = 0.0;
|
double sr = 0.0;
|
||||||
show_histogram_svg(bins,ttt);
|
show_histogram_svg(bins,sr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user