Compiler output
prog.cpp: In function 'int main()':
prog.cpp:5:30: warning: 'i2' may be used uninitialized in this function [-Wmaybe-uninitialized]
int i, n, a, max1, max2, i1, i2;
^
prog.cpp:5:26: warning: 'i1' may be used uninitialized in this function [-Wmaybe-uninitialized]
int i, n, a, max1, max2, i1, i2;
^
prog.cpp:26:11: warning: 'max2' may be used uninitialized in this function [-Wmaybe-uninitialized]
cout<<max1+max2-k;
^
prog.cpp:26:11: warning: 'max1' may be used uninitialized in this function [-Wmaybe-uninitialized]