0

Max sum in an array

Take an array.We need to calculate the maximum sum.Please help me if anyone Know the code

31st Jul 2018, 1:23 PM
pranathi chunduru
5 ответов
+ 1
try yourself first please and do share your query if you get stuck
31st Jul 2018, 1:38 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
what language
31st Jul 2018, 1:46 PM
Clark Kent
Clark Kent - avatar
0
c
31st Jul 2018, 1:51 PM
pranathi chunduru
0
int arr[8] = {1,2,3,4,5,6,7,8} int arr_sum = 0; for (int i = 0; i < arr[i]; i++) arr_sum += arr[i]; printf("sum of array is %d\n", arr_sum);
31st Jul 2018, 1:58 PM
Clark Kent
Clark Kent - avatar
0
tq
31st Jul 2018, 2:00 PM
pranathi chunduru