logo CodeStepByStep logo

NameDiamond

Language/Type: VB string parameters

Write a subroutine 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
Function: Write a VB function as described, not a complete program.

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.