code: изначальный для Lab4

master
Данил Гордиевских 1 год назад
Родитель c491c81842
Сommit 9f95f41fd9

@ -68,7 +68,6 @@ struct Input {
Input input_data() { Input input_data() {
Input in; Input in;
Input in2;
int VecSize = 0; int VecSize = 0;
cin >> VecSize; cin >> VecSize;
in.marks.resize(VecSize); in.marks.resize(VecSize);

@ -3,8 +3,7 @@ using namespace std;
void FindMinMax(const vector<double>& marks, double& min, double& max) { void FindMinMax(const vector<double>& marks, double& min, double& max) {
max = 0; max = 0;
min = 0; if (marks.size() != 0) {
if (marks.size() = 0) {
min = marks[0]; min = marks[0];
for (double x : marks) { for (double x : marks) {
if (x > max) { if (x > max) {
@ -14,9 +13,10 @@ void FindMinMax(const vector<double>& marks, double& min, double& max) {
min = x; min = x;
} }
} }
} }else{ min = 0; }
} }
vector <double> MakeHistogram(const vector<double>& marks, int NCharts) { vector <double> MakeHistogram(const vector<double>& marks, int NCharts) {
double interval = 0, i = 0, min = 0, max = 0; double interval = 0, i = 0, min = 0, max = 0;
vector<double> chart(NCharts); vector<double> chart(NCharts);

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
Загрузка…
Отмена
Сохранить