Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- const int SIZE = 8;
- int main()
- {
- int array[SIZE] = {-20, 19, 1, 5, -1, 27, 19, 5};
- int max;
- int i;
- max = array[0];
- for(i = 1; i < SIZE; i++)
- {
- if(array[i] > max)
- max = array[i];
- }
- printf("The maximum of this array is: %d\n", max);
- return(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment