Login with username, password and session length
Resend Activation Email | Forgot your Password?
Join IT Acumens Discussion Zone Free!
Share this topic on FacebookShare this topic on MySpaceShare this topic on Del.icio.usShare this topic on DiggShare this topic on RedditShare this topic on StumbleUponShare this topic on TwitterShare this topic on TechnoratiShare this topic on MagnoliaShare this topic on GoogleShare this topic on Yahoo

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: ascending order program  (Read 314 times)

Offline jayanthi mandhalapu

  • Acumen
  • Hero Member
  • ***
  • Posts: 4985
  • Acumen
    • View Profile
ascending order program
« on: August 06, 2009, 09:16:40 PM »
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

IT Acumens Discussion Zone

« on: »