20 likes | 118 Vues
Exercise: Two-dimensional Arrays. Write a program that displays the letter ‘V’ in a two-dimensional array, using the asterisk ‘*’ Use command line arguments input the size of a two-dimensional square array. Assume the size is at least 5.
E N D
Exercise: Two-dimensional Arrays • Write a program that displays the letter ‘V’ in a two-dimensional array, using the asterisk ‘*’ • Use command line arguments input the size of a two-dimensional square array. Assume the size is at least 5. (Avoid using an int type of command-line argument. use String instead. Then use parseInt to extract the integer from this String argument.) • Draw a big ‘V’ in the array (use the asterisk ‘*’ the appropriate cells) • Print the array (use nested loops)
For an array of size 5, the ‘V’ should look like this: Note that the array size may be an even number