Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 20;
n = 3;
y_correct = 3;
assert(isequal(nextpow(n,x),y_correct));
y =
3
|
2 | Pass |
x = 16;
n = 4;
y_correct = 2;
assert(isequal(nextpow(n,x),y_correct));
y =
2
|
3 | Pass |
x = 81;
n = 8;
y_correct = 3;
assert(isequal(nextpow(n,x),y_correct));
y =
3
|
4 | Pass |
x = 0;
n = 1;
y_correct = 0;
assert(isequal(nextpow(n,x),y_correct));
y =
0
|
5 | Pass |
x = -32;
n = 2;
y_correct = 5;
assert(isequal(nextpow(n,x),y_correct));
y =
5
|
6 | Pass |
x = -100;
n = 10;
y_correct = 2;
assert(isequal(nextpow(n,x),y_correct));
y =
2
|
Project Euler: Problem 7, Nth prime
521 Solvers
Create a square matrix of multiples
383 Solvers
351 Solvers
Find nearest prime number less than input number
268 Solvers
Number of digits in an integer
336 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!