Cody

Problem 42704. prime to each other

Solution 3880873

Submitted on 27 Nov 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
n1 = 3; n2 = 5; tf_correct = 0; assert(isequal(prime_to_each_other(n1, n2),tf_correct))

ans = 3 ans = 5

Output argument "tf" (and maybe others) not assigned during call to "prime_to_each_other". Error in Test1 (line 4) assert(isequal(prime_to_each_other(n1, n2),tf_correct))

2   Fail
n1 = 27; n2 = 123; tf_correct = 1; assert(isequal(prime_to_each_other(n1, n2),tf_correct))

ans = 3 3 3 ans = 3 41

Output argument "tf" (and maybe others) not assigned during call to "prime_to_each_other". Error in Test2 (line 4) assert(isequal(prime_to_each_other(n1, n2),tf_correct))

3   Fail
n1 = 36; n2 = 49; tf_correct = 0; assert(isequal(prime_to_each_other(n1, n2),tf_correct))

ans = 2 2 3 3 ans = 7 7

Output argument "tf" (and maybe others) not assigned during call to "prime_to_each_other". Error in Test3 (line 4) assert(isequal(prime_to_each_other(n1, n2),tf_correct))

4   Fail
n1 = 27; n2 = 28; tf_correct = 0; assert(isequal(prime_to_each_other(n1, n2),tf_correct))

ans = 3 3 3 ans = 2 2 7

Output argument "tf" (and maybe others) not assigned during call to "prime_to_each_other". Error in Test4 (line 4) assert(isequal(prime_to_each_other(n1, n2),tf_correct))

Suggested Problems

More from this Author2

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!