Program to find largest array element in C

Gapfill exercise

  

#include <stdio.h>

int main()
{

int loop, largest;

largest = array[0];

for(loop = 1; loop < 10; )
{
if( largest < array[loop] )
largest = array[loop];
}

printf("Largest element of array is %d", largest);

return 0;
}

3.GIF