Cody

# Problem 64. The Goldbach Conjecture, Part 2

Solution 1869036

Submitted on 9 Jul 2019
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
n = 6; c_correct = 1; assert(isequal(goldbach2(n),c_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in goldbach2 (line 2) sum(isprime(1:n/2) && isprime(n-1:-1:n/2)) Error in Test1 (line 3) assert(isequal(goldbach2(n),c_correct))

2   Fail
n = 10; c_correct = 2; assert(isequal(goldbach2(n),c_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in goldbach2 (line 2) sum(isprime(1:n/2) && isprime(n-1:-1:n/2)) Error in Test2 (line 3) assert(isequal(goldbach2(n),c_correct))

3   Fail
n = 50; c_correct = 4; assert(isequal(goldbach2(n),c_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in goldbach2 (line 2) sum(isprime(1:n/2) && isprime(n-1:-1:n/2)) Error in Test3 (line 3) assert(isequal(goldbach2(n),c_correct))

4   Fail
n = 480; c_correct = 29; assert(isequal(goldbach2(n),c_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in goldbach2 (line 2) sum(isprime(1:n/2) && isprime(n-1:-1:n/2)) Error in Test4 (line 3) assert(isequal(goldbach2(n),c_correct))