Cody

Solution 125442

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/msssystem14 ans = Name: '/users/msssystem14/+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/msssystem14' 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/msssystem14/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/msssystem14/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/msssystem14/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: [1x46 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 ans = Name: '/users/msssystem14/one to ten.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: [1x41 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/msssystem14 ans = Name: '/users/msssystem14/+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/msssystem14' 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/msssystem14/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/msssystem14/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/msssystem14/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: [1x46 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 ans = Name: '/users/msssystem14/one to ten.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: [1x41 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/msssystem14 ans = Name: '/users/msssystem14/+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/msssystem14' 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/msssystem14/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/msssystem14/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/msssystem14/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: [1x46 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 ans = Name: '/users/msssystem14/one to ten.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: [1x41 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

Suggested Problems

More from this Author95