Cody

Solution 1700331

Submitted on 29 Dec 2018 by Abdelfatah Teamah
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   Pass
AB = 43; BC = 55; AC = 66; y = combined_ages(AB,BC,AC); y_correct = [27 16 39]; for i = 1:3 assert(isequal(y(i),y_correct(i))) end

2   Pass
AB = 30; BC = 50; AC = 40; y = combined_ages(AB,BC,AC); y_correct = [10 20 30]; for i = 1:3 assert(isequal(y(i),y_correct(i))) end

3   Pass
AB = 20; BC = 70; AC = 60; y = combined_ages(AB,BC,AC); y_correct = [5 15 55]; for i = 1:3 assert(isequal(y(i),y_correct(i))) end

4   Pass
AB = 34; BC = 84; AC = 56; y = combined_ages(AB,BC,AC); y_correct = [3 31 53]; for i = 1:3 assert(isequal(y(i),y_correct(i))) end

5   Pass
y_correct = [2 11 21]; AB = y_correct(1) + y_correct(2); BC = y_correct(2) + y_correct(3); AC = y_correct(1) + y_correct(3); y = combined_ages(AB,BC,AC); for i = 1:3 assert(isequal(y(i),y_correct(i))) end

6   Pass
y_correct = [11 17 21]; AB = y_correct(1) + y_correct(2); BC = y_correct(2) + y_correct(3); AC = y_correct(1) + y_correct(3); y = combined_ages(AB,BC,AC); for i = 1:3 assert(isequal(y(i),y_correct(i))) end

7   Pass
y_correct = [15 35 55]; AB = y_correct(1) + y_correct(2); BC = y_correct(2) + y_correct(3); AC = y_correct(1) + y_correct(3); y = combined_ages(AB,BC,AC); for i = 1:3 assert(isequal(y(i),y_correct(i))) end