PinoyBigBusTed
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomePortalSearchLatest imagesRegisterLog inThx

Share | 
 

 Code for Ascending Order Array

View previous topic View next topic Go down 
AuthorMessage
Admin Psy¢h0
pBB-Psy¢h0*☼wnZ
pBB-Psy¢h0*☼wnZ
Admin Psy¢h0

:[]:Warning Level:[]: : Code for Ascending Order Array WarningBar-Gloss6sharp

Posts : 64
Points : 2147483642
Reputation : 17983
Join date : 2010-01-13

Code for Ascending Order Array Vide
PostSubject: Code for Ascending Order Array   Code for Ascending Order Array EmptyFri Feb 05, 2010 7:35 pm

Code for Ascending Order Array!
Code:
#include <iostream.h>
#include <conio.h>

void main()
{
clrscr();
int array[10],t,x;
cout << "Enter Integer No. "<< endl;
{
for(int x=0;x<10;x++)
cin>>array[x];
}
for (x=0;x<10;x++)
{
for(int y=0;y<9;y++)
{
if(array[y]>array[y+1])
{
t=array[y];
array[y]=array[y+1];
array[y+1]=t;
}
}
}
cout <<"Array in ascending order is:";
for (x=0;x<10;x++)
cout<<"\n\t\t\t\t"<< array[x];
getch();
}
Back to top Go down
https://pinoybigbusted.darkbb.com
 

Code for Ascending Order Array

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
PinoyBigBusTed :: [Programming] :: C++-
Free forum | ©phpBB | Free forum support | Report an abuse | Forumotion.com