logo CodeStepByStep logo

NameDiamond

Language/Type: C# string parameters
Related Links:

Write a method named NameDiamond that accepts a string as a parameter and prints it in a "diamond" format as shown below. For example, the call of NameDiamond("MARTY"); should print:

M
MA
MAR
MART
MARTY
 ARTY
  RTY
   TY
    Y
Method: Write a C# method as described, not a complete program or class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.