I am writing a program that reads two positive integers, W and X,
and displays a diamond with width W centered at column X on the
screen. Each displayed diamond should be preceded by a two row header
that indicates column numbers. Assume we work
with a screen of total width 75.
NOTE: I'm NOT asking you to do my homework I just need some help on to how to tackle this question.
Example:
width? 4
column? 13
12345678901234567890123456789012345678901234567890 1234567890123456789012345
................... 1
.................. 212
........... .... 32123
.......... ... 4321234
........... .... 32123
............ ..... 212
............. ..... 1 .......( EDIT- the .... don't have to be there)
Note: you must verify that your diamond can fit within the maximum
screen width. Diamonds must not be truncated or altered. You must
report weather the diamond would be truncated on the left, right or on
both sides of the 75 column screen. You can allow the diamond to
"touch" one of the sides, like in (width 2 / column 2). A width of 1
should produce the diamond "1".
What should I do?