commit suicide
This commit is contained in:
parent
d92d7511fe
commit
008177ba40
@ -19,7 +19,9 @@ int main() {
|
|||||||
cout << "Najwiekszy element: " << max1 << endl;
|
cout << "Najwiekszy element: " << max1 << endl;
|
||||||
cout << "Indeks najwiekszego elementu: " << k << 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++) {
|
for(i=1; i<n; i++) {
|
||||||
if(i!=k && a[i] > max2) {
|
if(i!=k && a[i] > max2) {
|
||||||
max2 = a[i];
|
max2 = a[i];
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user