Click here to Skip to main content
15,921,841 members

Comments by heryalu (Top 1 by date)

heryalu 1-Feb-16 7:34am View    
Try to initialize varriable g. You can simplyfy the loop:

g = 0;
for (k=0; k<10; k++)
{
if (g < arr[k])
{
g = arr[k];
}
}