array sort

#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
Its working for me. . .
Try using getch(); at end, before last brace. . .
yassss thank you so much
That means it worked. . .?
yas it working
Ok. Pleasure helping. . .
Topic archived. No new replies allowed.