You are viewing a single comment's thread. Return to all comments →
int value1=0; int value2=0; if(p==1){ return 0; } for(int i=1;i<=n/2;i++){ value1++; if(i==p/2){ break; } } for(int k=n/2;k<=n;k--){ if(k==p/2){ break; } value2++; } if(value1<=value2){ return value1; } else{ return value2; } } }
Seems like cookies are disabled on this browser, please enable them to open this website
Drawing Book
You are viewing a single comment's thread. Return to all comments →