Main.cc: In function 'int main()': Main.cc:35:5: error: 'k' was not declared in this scope k = a[i]-a[j]; ^ Main.cc:37:7: error: 'k' was not declared in this scope if(k<0) k*=-1; ^ Main.cc:38:7: error: 'k' was not declared in this scope if(k