|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
#include <curl/curl.h>
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <conio.h>
|
|
|
|
|
#include <vector>
|
|
|
|
@ -6,6 +8,7 @@
|
|
|
|
|
#include "histogram.h"
|
|
|
|
|
#include "text.h"
|
|
|
|
|
#include "svg01.h"
|
|
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
struct Input {
|
|
|
|
@ -16,6 +19,7 @@ struct Input {
|
|
|
|
|
Input
|
|
|
|
|
input_data(istream& in, bool prompt){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
size_t number_count;
|
|
|
|
|
if (prompt){
|
|
|
|
|
cerr << "Enter number count: ";
|
|
|
|
@ -31,6 +35,7 @@ input_data(istream& in, bool prompt){
|
|
|
|
|
for (size_t i=0; i < number_count; i++)
|
|
|
|
|
{
|
|
|
|
|
in >> iinn.numbers[i];
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (prompt){
|
|
|
|
@ -43,6 +48,7 @@ input_data(istream& in, bool prompt){
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
curl_global_init(CURL_GLOBAL_ALL);
|
|
|
|
|
|
|
|
|
|
Input iinn = input_data(cin, true);
|
|
|
|
|
std::vector<size_t> bins = make_histogram(iinn.numbers, iinn.bin_count);
|
|
|
|
|