diff --git a/BubbleSort.c b/BubbleSort.c index 0621c516..c5b546ce 100644 --- a/BubbleSort.c +++ b/BubbleSort.c @@ -7,11 +7,13 @@ #include #include -#define SIZE 7 +#include int main() { - int i,j,temp; - int arr[ SIZE ]; + int i,j,temp,SIZE; + printf("Enter number of elements to be sorted : "); + scanf("%d",&SIZE); + int *arr = (int*)malloc(SIZE*sizeof(int)); for(i=0; i