C programming how to complete the main in this class include

C programming:
how to complete the main in this class?


#include \"records.h\"
bubble(int a[], int N){ int i, j, t;
for (i=N-1; i>=1; i--) for(j=1; j<=i; j++)
if (a[j-1]>a[j]){ t=a[j-1];
a[j-1]=a[j];
a[j]=t; }
}
main(){
}


in records.h i have:
int records[200][7]={{47,5061,6392,855,3458,7367,5948},{61,2479… .. .. ..

Solution

It looks like the function bubble is to sort the array passed to this function as parameter.. As asked i will just define the main function here

void main()

{int ar[200];

int n;

printf(\"Please enter the number of elements of array\");

scanf(\"%d\",&n);

if(n>200)

prinf(\"Too large size enter within range of 200\");

printf(\"Please enter the elements of array\");

for(i=0;i<n;i++)

{

scanf(\"%d\",&ar[i]);

}

bubble(ar,n);

}

C programming: how to complete the main in this class? #include \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site