Main.cc: In function ‘int main()’:
Main.cc:23:11: error: ‘k2’ was not declared in this scope
int k1 = k2 = 1 , k = 0
^~
Main.cc:23:11: note: suggested alternative: ‘k1’
int k1 = k2 = 1 , k = 0
^~
k1
Main.cc:24:20: error: ‘i’ was not declared in this scope
for ( int i = 1 ; i < n ; i ++ )
^
Main.cc:45:10: error: ‘ans’ was not declared in this scope
cout << ans << endl ;
^~~
Main.cc:45:10: note: suggested alternative: ‘abs’
cout << ans << endl ;
^~~
abs
Main.cc:23:6: warning: unused variable ‘k1’ [-Wunused-variable]
int k1 = k2 = 1 , k = 0
^~