Обновить analysis.cpp
This commit is contained in:
@@ -32,11 +32,17 @@ int main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double Sum = 0;
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
Sum += profit[i];
|
||||||
|
}
|
||||||
|
|
||||||
cout << "\nРезультати аналiзу:" << endl;
|
cout << "\nРезультати аналiзу:" << endl;
|
||||||
cout << "Мiсяць з максимальним прибутком: " << months[maxIndex]
|
cout << "Мiсяць з максимальним прибутком: " << months[maxIndex]
|
||||||
<< " (прибуток: " << profit[maxIndex] << ")" << endl;
|
<< " (прибуток: " << profit[maxIndex] << ")" << endl;
|
||||||
cout << "Мiсяць з мiнiмальним прибутком: " << months[minIndex]
|
cout << "Мiсяць з мiнiмальним прибутком: " << months[minIndex]
|
||||||
<< " (прибуток: " << profit[minIndex] << ")" << endl;
|
<< " (прибуток: " << profit[minIndex] << ")" << endl;
|
||||||
|
cout << "Загальна сума прибутку за рiк: " << Sum << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user