Hey everyone
I'm trying to learn to write a program that prints the highest number on an array list. Here's what I've done so far:
Does anyone know how to do this? I'm strugling with this - we have to know the basics like this in order to do an assignment later in the term! If anyone knows anything, I would greatly appreciate your help
| Code: |
| #include<stdio.h>
#include<stdlib.h> int maxNumbers(int[], int); main() { /* Load an integer array with values */ int numbers[20] = {10, 34, 23, 54, 23, 12, 56, 76, 34, 21, 25, 46, 67, 69, 53, 28, 84, 90, 92, 12}; printf("The maximum number in the list is %d.\n", maxNumbers(numbers, 20)); /* Pause to see output */ system("pause"); } //THIS IS WHERE I'M HAVING PROBLEMS: int maxNumbers(int list[], int count) { int max = 0, x; for( |
Does anyone know how to do this? I'm strugling with this - we have to know the basics like this in order to do an assignment later in the term! If anyone knows anything, I would greatly appreciate your help
