[try Beta version]
Not logged in

 
array sort

Dec 7, 2013 at 4:30pm
#include <iostream>
using namespace std;
void main (){
int a[4]={3,8,0,10};
int k=8;
int index ;
for(int i=0;i<=3;i++)
if (a[i]==k){
index=i;
break;}
cout<<"\n index of "<<k<<"is ["<<i<<"]";
system("pause");
}


Does not print anything :"(
help me please
Dec 7, 2013 at 4:51pm
Its working for me. . .
Try using getch(); at end, before last brace. . .
Dec 7, 2013 at 5:15pm
yassss thank you so much
Dec 7, 2013 at 5:23pm
That means it worked. . .?
Dec 7, 2013 at 5:32pm
yas it working
Dec 8, 2013 at 6:06am
Ok. Pleasure helping. . .
Topic archived. No new replies allowed.