Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
47 строки
718 B
C++
47 строки
718 B
C++
#include <iostream>
|
|
#include <vector>
|
|
#include <math.h>
|
|
#include "histogram.h"
|
|
#include "text.h"
|
|
#include "svg.h"
|
|
|
|
using namespace std;
|
|
|
|
struct Input
|
|
{
|
|
vector<double>numbers;
|
|
size_t kol_kor{};
|
|
size_t number_count;
|
|
};
|
|
|
|
Input
|
|
input_data()
|
|
{
|
|
Input in;
|
|
|
|
cerr<<"Marks: ";
|
|
cin>>in.number_count;
|
|
|
|
|
|
in.numbers.resize(in.number_count);
|
|
for (size_t i=0; i<in.number_count; i++)
|
|
{
|
|
cerr<<"numbers["<<i<<"]=";
|
|
cin>>in.numbers[i];
|
|
}
|
|
|
|
cerr<<"Kol_kor: ";
|
|
cin>>in.kol_kor;
|
|
return in;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
size_t number_count;
|
|
auto in = input_data();
|
|
auto B = make_histogram(in.numbers, in.kol_kor);
|
|
show_histogram_svg(B, in.number_count);
|
|
|
|
return 0;
|
|
}
|