Commit bb3c6153 by phkarl

Upload New File

parent 34990696
Showing with 49 additions and 0 deletions
#include <stdio.h>
int main(){
int ArrayOfNumbers[10];
int maxValue;
int minValue;
int i = 0;
int average;
maxValue = 0;
minValue = 999999;
average = 0;
i = 0;
while (i < 10){
printf("Input Number %d :", i);
scanf("%d", &ArrayOfNumbers[i]);
i = i + 1;
}
i = 0;
while (i < 10){
if(maxValue < ArrayOfNumbers[i]){
maxValue = ArrayOfNumbers[i];
}
i = i + 1;
}
printf("The higest number is: %d \n", maxValue);
i = 0;
while (i < 10){
if(minValue > ArrayOfNumbers[i]){
minValue = ArrayOfNumbers[i];
}
i = i + 1;
}
printf("The lowest number is: %d \n", minValue);
i = 0;
while (i < 10){
average = average + ArrayOfNumbers[i];
i = i + 1;
}
printf("The average is: %d \n", average);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment