Commit 6289d80c by matjul

Upload New File

parent 0c371a03
Showing with 31 additions and 0 deletions
#include <stdio.h>
int main (){
int array[10];
int i = 0;
printf("Enter the number of elements in array\n");
while(i < 10){
scanf("%i", &array[i]) ;
i++ ;
}
int maxValue = array[0];
i=1;
while(i < 10){
if(maxValue < array[i]){
maxValue = array[i];
i++;
}
else {
i++;
}
}
printf("The maximum value is: %i", maxValue) ;
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