lol
Code:
#include<stdio.h>
int main()
{
int x;
int array[]={20,33,4563,445645,545645,64566,55456,4456,645645,445,65,54,65,456454};
for(x=1;x<14;x++)
{
if(array[x]>array[0])
{
array[0]=array[x];
}
}
printf("The Smallest Value In The Array Is %d",array[0]);
return 0;
}
it works
and i tried to work on my indentation
but why it didn't work when i used the first example
maybe because i assumed that the smallest value wouldn't be smaller than 0??
and i guess that OnionKnight's idea is some kind of sorting right ?