Question: PLEASE ANSWER IN JAVA PLEASE ANSWER IN JAVA PLEASE ANSWER IN JAVA Assume we have already defined a variable of type int called num with
PLEASE ANSWER IN JAVA
PLEASE ANSWER IN JAVA
PLEASE ANSWER IN JAVA

Assume we have already defined a variable of type int called num with the following line of code: int num = ???; // 'num' can have any int value TASK: Print a Triforce composed of 3 centered triangles created with num asterisks (*) on the bottom row, num - 2 asterisks on the next bottom row, ..., and 1 asterisk on the top row, and such that the triangles are surrounded by hyphens (-). You can assume that num is odd and is at least EXAMPLE: If num is 5, the resulting Triforce would be the following: ----- ----- ----- -- -***---***- *****-***** Sample Input: Sample Output: *** ** *** **
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
