mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-21 21:11:57 +03:00
Update BubbleSort.c
This program takes the number of elements to be sorted as an input from the user. I think it may be better if we use this.
This commit is contained in:
parent
6f651d147c
commit
03acb2b1ea
@ -7,11 +7,13 @@
|
||||
|
||||
#include<stdio.h>
|
||||
#include<conio.h>
|
||||
#define SIZE 7
|
||||
#include<stdlib.h>
|
||||
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<SIZE; i++)
|
||||
{
|
||||
printf("Enter Number : ");
|
||||
|
Loading…
Reference in New Issue
Block a user