mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-25 06:49:36 +03:00
Merge pull request #7 from malnuxstarck/patch-2
Fill array and print to see if it works
This commit is contained in:
commit
652690070f
@ -10,6 +10,20 @@ 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]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user