добавил поток
Этот коммит содержится в:
@@ -74,15 +74,15 @@
|
|||||||
1745611606 c:\users\ïëàòîí\desktop\project\lab01\histogram_internal.h
|
1745611606 c:\users\ïëàòîí\desktop\project\lab01\histogram_internal.h
|
||||||
<vector>
|
<vector>
|
||||||
|
|
||||||
1746093073 source:c:\users\ïëàòîí\desktop\project\lab01\histogram.cpp
|
1747659893 source:c:\users\ïëàòîí\desktop\project\lab01\histogram.cpp
|
||||||
<iostream>
|
<iostream>
|
||||||
<vector>
|
<vector>
|
||||||
"histogram.h"
|
"histogram.h"
|
||||||
|
|
||||||
1746094194 c:\users\ïëàòîí\desktop\project\lab01\svg.h
|
1747659893 c:\users\ïëàòîí\desktop\project\lab01\svg.h
|
||||||
<vector>
|
<vector>
|
||||||
|
|
||||||
1746094194 source:c:\users\ïëàòîí\desktop\project\lab01\svg.cpp
|
1747659893 source:c:\users\ïëàòîí\desktop\project\lab01\svg.cpp
|
||||||
<math.h>
|
<math.h>
|
||||||
<iostream>
|
<iostream>
|
||||||
<conio.h>
|
<conio.h>
|
||||||
|
|||||||
16
main.cpp
16
main.cpp
@@ -12,24 +12,24 @@ struct Input {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Input
|
Input
|
||||||
input_data() {
|
input_data(istream& in){
|
||||||
size_t number_count, bin_count;
|
size_t number_count;
|
||||||
cerr << "Enter number count: ";
|
cerr << "Enter number count: ";
|
||||||
cin >> number_count;
|
cin >> number_count;
|
||||||
Input in;
|
Input inp;
|
||||||
in.numbers.resize(number_count);
|
inp.numbers.resize(number_count);
|
||||||
for (size_t i = 0; i < number_count; i++)
|
for (size_t i = 0; i < number_count; i++)
|
||||||
{
|
{
|
||||||
cerr << "Enter Num[" << i << "]: ";
|
cerr << "Enter Num[" << i << "]: ";
|
||||||
cin >> in.numbers[i];
|
cin >> inp.numbers[i];
|
||||||
}
|
}
|
||||||
cerr << "Enter bin count: ";
|
cerr << "Enter bin count: ";
|
||||||
cin >> in.bin_count;
|
cin >> inp.bin_count;
|
||||||
return in;
|
return inp;
|
||||||
}
|
}
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
auto in = input_data();
|
auto in = input_data(cin);
|
||||||
auto bins = make_histogram(in.numbers, in.bin_count);
|
auto bins = make_histogram(in.numbers, in.bin_count);
|
||||||
show_histogram_svg(bins);
|
show_histogram_svg(bins);
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user