Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

plz use java Assume we have already defined a variable of type int called num with the following line of code: int num = ???;

image text in transcribedplz use 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 odo and is at least 3. EXAMPLE: If num is 5, the resulting Triforce would be the following: II * * * II I * III * * III * * * * * ILLIK * TIL * Sample Input: Sample Output: 1 1 TIL 1 1 I * * * * * * III * * * III * * * * * 1 * * *

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

=+What is the nature of the unions in the particular country?

Answered: 1 week ago