That's my program..the problem is that I don't know what to put in the main. My brain just SHUT DOWN and it's not functioning well..Code:#include <stdio.h> #include <conio.h> void swap(int *, int *); void bubble(int [], int); main(){ int a[] = {7, 3, 66, 3, -5, 22, -77, 2}; printf("I will arrange these numbers in order"); bubble(a[], n); printf("%d", a[]); getch(); return 0; } void swap(int *p, int *q) { int tmp; tmp = *p; *p = *q; *q = tmp; } void bubble(int a[]; int n) { int i, j; for(i=0; i < n-1; ++i) for(j = n-1; i<j; --j) if(a[j-1] > a[j]) swap(&a[j-1], &a[j]); }![]()
:blush:
Can anyone please help?



LinkBack URL
About LinkBacks
:blush:



Let's start by shredding your code.