Cody

Solution 236848

Submitted on 27 Apr 2013
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
%% str = 'b';n=5 y_correct = 'bbbbb'; assert(isequal(duplicate_char(str,n),y_correct))
Error: Assertion failed.
2   Pass
%% str = 's';n=1 y_correct = 's'; assert(isequal(duplicate_char(str,n),y_correct))
n = 1
3   Fail
%% str = 'b';n=10 y_correct = 'bbbbbbbbbb'; assert(isequal(duplicate_char(str,n),y_correct))
Error: Assertion failed.
4   Pass
%% str = 'b';n=0 y_correct = ''; assert(isequal(duplicate_char(str,n),y_correct))
n = 0
5   Fail
%% str = '?';n=2 y_correct = '??'; assert(isequal(duplicate_char(str,n),y_correct))
Error: Assertion failed.