Hi can some one tell me what's wrong here its not showing the results that should be

Code:for(int s=0; s<n; s++){ cout<< "for the custmor " << s << "his neighbors in the increasing distance order are : " << endl; for(int b=1; b<n;b++){ for (int w=0; w<n; w++) if(s!=w) for (int i=1; i<=b ;i++){ if(vect[s][i]!=w){ for(int m=w+1;m<n; m++) if(s!=m){ for (int i=1; i<=b ;i++){ if (vect[s][i]!=m){ if(dis[s][w]<dis[s][m]){ if(dis[s][w]<distance){ voi=w; distance=dis[s][w]; }} else if(dis[s][w]>dis[s][m]){ if(dis[s][m]<distance){ voi=m; distance=dis[s][m]; }}}} vect[s][b]=voi;}}} cout << vect[s][b] <<endl;}}