Cody

Solution 125443

Submitted on 9 Aug 2012 by Óscar
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
%% a = 1; b = 2; c_correct = 3; assert(isequal(add_two_numbers(a,b),c_correct))

ans = /users/msssystem7 add_two_numbers.m +cody Shared add_two_numbers_testsuite.m Published ans = Name: '/users/msssystem7/+cody' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7/Published' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7/Shared' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 0 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7/add_two_numbers.m' archive: NaN system: NaN hidden: NaN directory: 0 UserRead: 1 UserWrite: 1 UserExecute: 0 GroupRead: 1 GroupWrite: 0 GroupExecute: 0 OtherRead: 1 OtherWrite: 0 OtherExecute: 0 ans = Name: [1x45 char] archive: NaN system: NaN hidden: NaN directory: 0 UserRead: 1 UserWrite: 1 UserExecute: 0 GroupRead: 1 GroupWrite: 0 GroupExecute: 0 OtherRead: 1 OtherWrite: 0 OtherExecute: 0

2   Pass
%% a = 17; b = 2; c_correct = 19; assert(isequal(add_two_numbers(a,b),c_correct))

ans = /users/msssystem7 add_two_numbers.m +cody Shared add_two_numbers_testsuite.m Published ans = Name: '/users/msssystem7/+cody' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7/Published' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7/Shared' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 0 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7/add_two_numbers.m' archive: NaN system: NaN hidden: NaN directory: 0 UserRead: 1 UserWrite: 1 UserExecute: 0 GroupRead: 1 GroupWrite: 0 GroupExecute: 0 OtherRead: 1 OtherWrite: 0 OtherExecute: 0 ans = Name: [1x45 char] archive: NaN system: NaN hidden: NaN directory: 0 UserRead: 1 UserWrite: 1 UserExecute: 0 GroupRead: 1 GroupWrite: 0 GroupExecute: 0 OtherRead: 1 OtherWrite: 0 OtherExecute: 0

3   Pass
%% a = -5; b = 2; c_correct = -3; assert(isequal(add_two_numbers(a,b),c_correct))

ans = /users/msssystem7 add_two_numbers.m +cody Shared add_two_numbers_testsuite.m Published ans = Name: '/users/msssystem7/+cody' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7/Published' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 1 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7/Shared' archive: NaN system: NaN hidden: NaN directory: 1 UserRead: 1 UserWrite: 0 UserExecute: 1 GroupRead: 1 GroupWrite: 0 GroupExecute: 1 OtherRead: 1 OtherWrite: 0 OtherExecute: 1 ans = Name: '/users/msssystem7/add_two_numbers.m' archive: NaN system: NaN hidden: NaN directory: 0 UserRead: 1 UserWrite: 1 UserExecute: 0 GroupRead: 1 GroupWrite: 0 GroupExecute: 0 OtherRead: 1 OtherWrite: 0 OtherExecute: 0 ans = Name: [1x45 char] archive: NaN system: NaN hidden: NaN directory: 0 UserRead: 1 UserWrite: 1 UserExecute: 0 GroupRead: 1 GroupWrite: 0 GroupExecute: 0 OtherRead: 1 OtherWrite: 0 OtherExecute: 0