I saw a code in which the guy had done addition like this
long long int sum = arr[i] + arr[j];
sum += arr[k];
sum += arr[l];
I would like to know why can’t we do it like this
long long int sum = arr[i] + arr[j] +arr[k] + arr[l];
New contributor
Ramya Shah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.