So I need help to do a work for school which consists of doing an algorithm that allows you to draw a pyramid of letters. The algorithm should ask the user to input one letter and then drew the pyramid.
Example: If the letter that the user input is 'd' or 'D', the result should be the following:
D
DCD
DCBCD
DCBABCD
or
If the letter that the user input is 'f' or 'F', the result should be the following:
F
FEF
FEDEF
FEDCDEF
FEDCBCDEF
FEDCBABCDEF
____
If some one can do this please post the code, I'd be trully grateful.