cstartes
Search stops here
Pages
Home
Blogroll
Guest Post
Privacy Policy
Contact Us
About
Ascending order of array.
void main()
{
int a[100],a,i,j,temp;
clrscr();
printf("Enter the element of the array");
for(i=0;i
{
scanf("%d",&a[i])
}
for(i=0;i
{
for(j=(i++);j
{
if(a[i]>a[i])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
for(i=0;i
{
printf("%d",a[i]);
}
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment