Write a program to print the diamond shape using user-specified character and size, where the size should be an even number greater than or equal to 6. The program will keep asking the user for a valid size. Using a while loop and nested for loop. For example:
Enter a letter: A
Enter a size (even number no less than 6): 5
Enter a size (even number no less than 6): 9
Enter a size (even number no less than 6): 6
AA
AAAA
AAAAAA
AAAAAA
AAAA
AA
Compile command
javac PrintCustomizedDiamond.java -Xlint:all -encoding utf-8
We will use this command to compile your code
Enjoy 24/7 customer support for any queries or concerns you have.
Phone: +1 213 3772458
Email: support@gradeessays.com