From d911aa17da0efe48fd256a555a98a7888df0b9f1 Mon Sep 17 00:00:00 2001 From: Abdoul Malik Date: Thu, 23 Mar 2017 15:02:51 +0100 Subject: [PATCH] Fill array and print to see if it works --- OtherBubbleSort.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/OtherBubbleSort.c b/OtherBubbleSort.c index dad8e95e..f11fd63e 100644 --- a/OtherBubbleSort.c +++ b/OtherBubbleSort.c @@ -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]); + }