How to print maximum of two sum


like one person will read 113 and other 90.

we have to print the max so 113 should be the output but my code is showing 90

@akash_281 you are choosing incorrect range for end, initialize it with sum of all a[i].
more mistakes:

  1. Incorrect implementation of check
  2. print ans inside while loop (one with t>0)