Question: JAVA ____* ___*_* __*___* _*_____* ********* Create a class Triangle that draws simple triangles using ASCII characters and prints to standard output. The program should

JAVA

____* ___*_* __*___* _*_____* *********

Create a class Triangle that draws simple triangles using ASCII characters and prints to standard output. The program should read in from the console an integer which represents the height (in characters) of the triangle. Use the * character to draw the resulting triangle. The first line should have one*, the second will have a * followed by one space, followed by a *, the third will have three spaces, the fourth will have five, etc. The last line will have (height x 2) - 1 *'s. For example, for an input of 5, the output might look like this (here a '_' is drawn to represent a space character):

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!