Question: Write a complete Java program that reads an odd number from the user. Your program should then use this odd number and nested for loops

Write a complete Java program that reads an odd number from the user. Your program should then use this odd number and nested for loops to print a cross made of stars. Some samples of how your program should run are shown below:

Sample Output:

Please enter an odd number of stars: 3

* *

*

* *

Please enter an odd number of stars: 5

* *

* *

*

* *

* *

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!