#include<stdio.h>

#include<stdlib.h>

int max (int num1, int num2)

{

return (num1>num2)? num1:num2;

}

int maxSubArraySum(int a[], int size)

{

int max_so_far=a[0];

int curr_max=a[0];

for(int i=1;i<size;i++)

{

curr_max="max(a[i],curr_max+a[i]);

" max_so_far="max(max_so_far,curr_max);

}

return" max_so_far;

}

int="" main()

{

="" int="" a="" []="{-3,4,2,1,-4,6,-10,0,-4,3};

" n="sizeof(a)/sizeof(a[0]);

" max_sum="maxSubArraySum(a,n);

" printf("largest="" contiguous="" sum="" of="" elements="" from="" that="" array="" numbers="" is="" %d",max_sum);

return="" 0;

}<pre="" lang="text">

check peter make a new code bro

15,040,212 members

Improve questionto update your question.A space after '<' may help with source code.