diff --git a/LABA1.cpp b/LABA1.cpp index 06dc84c..36c7c63 100644 --- a/LABA1.cpp +++ b/LABA1.cpp @@ -68,7 +68,6 @@ struct Input { Input input_data() { Input in; - Input in2; int VecSize = 0; cin >> VecSize; in.marks.resize(VecSize); diff --git a/histogram.cpp b/histogram.cpp index a4c686b..5f13b9d 100644 --- a/histogram.cpp +++ b/histogram.cpp @@ -3,8 +3,7 @@ using namespace std; void FindMinMax(const vector& marks, double& min, double& max) { max = 0; - min = 0; - if (marks.size() = 0) { + if (marks.size() != 0) { min = marks[0]; for (double x : marks) { if (x > max) { @@ -14,9 +13,10 @@ void FindMinMax(const vector& marks, double& min, double& max) { min = x; } } - } + }else{ min = 0; } } + vector MakeHistogram(const vector& marks, int NCharts) { double interval = 0, i = 0, min = 0, max = 0; vector chart(NCharts); diff --git a/unittest.vcxproj.user b/unittest.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/unittest.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file