News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

Main Menu

ascending order program

Started by jayanthi mandhalapu, Aug 06, 2009, 09:16 PM

Previous topic - Next topic

jayanthi mandhalapu

the main concept of the program

for(i=0;i<n;i++)
scanf("%d",&x);
for(i=0;i<n;i++)
for(j=i+1;j<n;j++)
if(x>x[j])
{
temp=x;
x=x[j];
x[j]=temp;
}
printf("ascending order of given no");
for(i=0;i<n;i++)
printf("%5d",x);
Be Happy And Always Remain So

MichaelVot


Davidfem