Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 1461. Duplicate a character

Duplicate a character 'n' times.

Example 1: str='a' n=5

output='aaaaa'

Example 2: str='*' n=3

output='***'

Problem Group

Solution Statistics

46 correct solutions 78 incorrect solutions
Last solution submitted on Mar 09, 2014

Problem Comments