Skip to content
Snippets Groups Projects
Commit d85b01e9 authored by SCHMIDT LUCAS's avatar SCHMIDT LUCAS
Browse files

debugage de choisirPivotMedian

parent f7901a27
No related merge requests found
......@@ -17,11 +17,11 @@ long choisirPivotMedian(long* A,size_t p,size_t r){
long b = choisirPivotAlea(A,p,r);
long c = choisirPivotAlea(A,p,r);
long res;
if((b <= a && a <= c) || (c >= a && a >= b)){
if((b <= a && a <= c) || (b >= a && a >= c)){
res = a;
}else if((a <= b && b <= c) || (c >= b && b >= a)){
}else if((a <= b && b <= c) || (a >= b && b >= c)){
res = b;
}else if((b <= c && c <= a) || (a >= c && c >= b)){
}else if((b <= c && c <= a) || (b >= c && c >= a)){
res = c;
}else{
printf("non\n");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment