Main.cc: In function ‘int main()’:
Main.cc:18:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(a[k] = a[i]+a[j])
~~~~~^~~~~~~~~~~
Main.cc:18:8: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if(a[k] = a[i]+a[j])
^~
Main.cc:20:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
break;
^~~~~
Main.cc:26:1: error: expected ‘}’ at end of input
}
^
Main.cc:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
Main.cc:11:11: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~