corregir ejercicio 1
This commit is contained in:
1 parent
35b63ac2b1
commit
591c09e37a
1 file changed
+1
-1
+1
-1
@@ -4,7 +4,7 @@ public class Metodos1{
|
||||
}
|
||||
public static int potencias2(int n){
|
||||
int result = 1;
|
||||
while(result <= n) result = result << 1;
|
||||
while(1 << result <= n) result++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user