Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #107.41K
#include <iostream.h> void main () { int i,j,temp,smallest; int list [10]; for (i=0;i<10;i++) { cout<<"enter a number\n"; cin>>list[i]; } for (i=0;i<10;i++) { smallest=i; for (j=i+1;j<10;j++) { if(list[j]<list[smallest]) smallest=j; } temp=list[smallest]; list[smallest]=list[i] list[i]=temp; { for(i=0;i<10;i++) cout<<list[i]<<endl; getch(); } |