|
|
|
@ -8,8 +8,7 @@ struct Input {
|
|
|
|
|
int NCharts = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Input
|
|
|
|
|
input_data() {
|
|
|
|
|
Input input_data() {
|
|
|
|
|
Input in;
|
|
|
|
|
int VecSize = 0;
|
|
|
|
|
cin >> VecSize;
|
|
|
|
@ -21,18 +20,15 @@ input_data() {
|
|
|
|
|
return in;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
void show_histogram_text(const vector<double>& marks, const vector<double>& chart) {
|
|
|
|
|
int VecSize = size(marks);
|
|
|
|
|
const int shift = 4, maxlen = 80;
|
|
|
|
|
Input in = input_data();
|
|
|
|
|
int VecSize = size(in.marks);
|
|
|
|
|
double interval = 0, inp = 0, i = 0, min = 0, max = 0, scale = 1;
|
|
|
|
|
vector <double> chart = MakeHistogram(in.marks, in.NCharts);
|
|
|
|
|
FindMinMax(chart, min, max);
|
|
|
|
|
if ((max + shift) > maxlen) {
|
|
|
|
|
scale = (max + shift) / maxlen;
|
|
|
|
|
}
|
|
|
|
|
for (i = 0; i < in.NCharts; i++) {
|
|
|
|
|
for (i = 0; i < size(chart); i++) {
|
|
|
|
|
if (chart[i] < 10) {
|
|
|
|
|
cout << " ";
|
|
|
|
|
}
|
|
|
|
@ -49,4 +45,11 @@ int main()
|
|
|
|
|
}
|
|
|
|
|
cout << "\n";
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
Input in = input_data();
|
|
|
|
|
vector <double> chart = MakeHistogram(in.marks, in.NCharts);
|
|
|
|
|
show_histogram_text(in.marks, chart);
|
|
|
|
|
}
|