cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
array sort
array sort
Dec 7, 2013 at 4:30pm UTC
doaa ebraheem
(7)
#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 UTC
dncp4312
(14)
Its working for me. . .
Try using
getch();
at end, before last brace. . .
Dec 7, 2013 at 5:15pm UTC
doaa ebraheem
(7)
yassss thank you so much
Dec 7, 2013 at 5:23pm UTC
dncp4312
(14)
That means it worked. . .?
Dec 7, 2013 at 5:32pm UTC
doaa ebraheem
(7)
yas it working
Dec 8, 2013 at 6:06am UTC
dncp4312
(14)
Ok. Pleasure helping. . .
Topic archived. No new replies allowed.