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