Fill array and print to see if it works

This commit is contained in:
Abdoul Malik 2017-03-23 15:02:51 +01:00 committed by GitHub
parent 7b302b48cd
commit d911aa17da

View File

@ -9,7 +9,21 @@ int main()
{
int i , arraySort[MAX] ={0} , isSort = FALSE, changePlace;
/* For example
Insertion random values in array to test
*/
for(i = 0 ; i < MAX; i++)
{
arraySort[i] = rand()%101 ;
}
/* Algorithm of bubble methods */
while(isSort)
{
isSort = FALSE;
@ -25,7 +39,14 @@ int main()
}
}
}
/* See if it works */
for(i = 0 ; i < MAX; i++)
{
printf("%d\n", arraySort[i]);
}