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