Обновить 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 << "Мiсяць з максимальним прибутком: " << months[maxIndex]
|
||||
<< " (прибуток: " << profit[maxIndex] << ")" << endl;
|
||||
cout << "Мiсяць з мiнiмальним прибутком: " << months[minIndex]
|
||||
<< " (прибуток: " << profit[minIndex] << ")" << endl;
|
||||
cout << "Загальна сума прибутку за рiк: " << Sum << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user