Dear all
I write bubble sort program for inputing 9 numbers. However, when compile and run it, it only allows me to input one number only. Could anyone see any fault in my code? I think the problem is on the first loop.
#include <stdio.h>
int main(void)
{
int num1 = 0;
int array[9];
int i = 0;
int j = 0;
for (i=0; i<=9;i++);
{
printf("%s",&"please input numbers\n");
scanf("%s",&array[i]);
}
for ( i=0 ; i<=8 ; i++ );
{
for (j=i+1;j<=9;j++);
{
int temp;
if(array[i]>array[j]);
{
temp = array[i];
array[i]=array[j];
array[j]=temp;
}
}
}
}//end