Cody

Solution 1781723

Submitted on 10 Apr 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
nl = char(10); contents = strsplit(fileread('quine.m'),nl); ref_contents = [strjoin(contents(1:end-2),nl), nl]; actual_contents=quine(); assert( isequal(ref_contents,actual_contents) )

function data = quine(varargin) q = ''''; x = 'function data = quine(varargin)\n\tq = %s%s%s%s;\n\tx = %s%s%s;\n\tdata = fprintf(x,q,q,q,q,q,x,q);\nend\n'; data = fprintf(x,q,q,q,q,q,x,q); end

Assertion failed.