commit suicide

This commit is contained in:
Sebastian Ranoszek 2025-01-29 09:23:04 +01:00
parent d92d7511fe
commit 008177ba40
2 changed files with 3 additions and 1 deletions

View File

@ -19,7 +19,9 @@ int main() {
cout << "Najwiekszy element: " << max1 << endl;
cout << "Indeks najwiekszego elementu: " << k << endl;
max2 = a[0];
if(k == 0) max2 = a[1];
else max2 = a[0];
for(i=1; i<n; i++) {
if(i!=k && a[i] > max2) {
max2 = a[i];