Compiler output
prog.cpp: In function 'int main()':
prog.cpp:6:1: warning: 'n' is used uninitialized in this function [-Wuninitialized]
for(i=1; i<=n; i++)
^
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:25:11: warning: 'max2' may be used uninitialized in this function [-Wmaybe-uninitialized]
cout<<max1+max2-k;
^
prog.cpp:25:11: warning: 'max1' may be used uninitialized in this function [-Wmaybe-uninitialized]