#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
//int a[10]={2,5,1,7,0,10,145,14,15,9};
int a[10]={1,2,3,4,5,6,7,8,9,10};
int tem,i=0,j,isTRUE=0;
for(j=0; j<10; j++)
{
if(a[j]<a[j+1])
{
isTRUE=1;
break;
}
isTRUE=0;
}
if(isTRUE)
printf("inorder\n");
else
printf("ASEorder\n");
getch();
return 0;
}
Here's my source code about checking an array is ordered or not
But it didn't work properly, but i cannot find any mistake
Help me!
Thank you!