Cody

# Problem 1694. Now 20% off!

Solution 914187

Submitted on 23 Jun 2016 by Alexander
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
s='non-essential personnel' s_correct = 'non-eXsentXal peXsonnXl'; assert(isequal(string_furlough(s),s_correct))

s = non-essential personnel a = 1 2 3 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 21 22 23 s = non-eXsentXal peXsonnXl

2   Pass
s='The furloughs will continue until morale improves.' s_correct = 'The fXrlouXhs wiXl conXinue Xntil XoralX imprXves.'; assert(isequal(string_furlough(s),s_correct))

s = The furloughs will continue until morale improves. a = Columns 1 through 29 1 2 3 5 6 7 8 9 10 11 12 13 15 16 17 18 20 21 22 23 24 25 26 27 29 30 31 32 33 Columns 30 through 43 35 36 37 38 39 40 42 43 44 45 46 47 48 49 s = The fXrlouXhs wiXl conXinue Xntil XoralX imprXves.

3   Pass
s='Who doesn''t like a 20% pay cut?' s_correct='Who dXesn''t Xike a 20% Xay cuX?' assert(isequal(string_furlough(s),s_correct))

s = Who doesn't like a 20% pay cut? s_correct = Who dXesn't Xike a 20% Xay cuX? a = 1 2 3 5 6 7 8 9 11 13 14 15 16 18 24 25 26 28 29 30 s = Who dXesn't Xike a 20% Xay cuX?

4   Pass
s='The quick brown fox jumps over the lazy dog.' s_correct = 'The qXick bXown fXx jumXs oveX the lXzy doX.'; assert(isequal(string_furlough(s),s_correct))

s = The quick brown fox jumps over the lazy dog. a = Columns 1 through 29 1 2 3 5 6 7 8 9 11 12 13 14 15 17 18 19 21 22 23 24 25 27 28 29 30 32 33 34 36 Columns 30 through 35 37 38 39 41 42 43 s = The qXick bXown fXx jumXs oveX the lXzy doX.

5   Pass
s='A-B-C. Easy as 1-2-3.'; s_correct = 'A-B-C. EXsy as 1-2-3.'; assert(isequal(string_furlough(s),s_correct))

a = 1 3 5 9 10 11 12 14 15 s = A-B-C. EXsy as 1-2-3.

6   Pass
s='My single favorite TV show is X-Files!'; s_correct='My siXgle fXvoriXe TV sXow is X-FileX!'; assert(isequal(string_furlough(s),s_correct))

a = Columns 1 through 29 1 2 4 5 6 7 8 9 11 12 13 14 15 16 17 18 20 21 23 24 25 26 28 29 31 33 34 35 36 Column 30 37 s = My siXgle fXvoriXe TV sXow is X-FileX!

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!