Hi guys, can I ask how can I create a C Program that will ask the user to enter 10 integer numbers and display the minimum & maximum values and the number of INDECES in between them.
Example.
I am asked to input 10 integer numbers, so for example i'll input 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.
#include<stdio.h>
#include<conio.h>
#define SIZE 10
main()
{
int number[SIZE], i, sum = 0;
float ave;
printf("Enter %d numbers:\n", SIZE);
for (i = 0; i < SIZE; i++)
// accept the inputs
scanf("%d", &number[i]);
// display the values
for (i = 0; i < SIZE; i++)
{
// display the values
printf("number[%d] = %d\n", i, number[i]);
}
getch();
}