Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is for JAVA. For my assignment, I have to make a program that makes ASCII triangle shapes using either brackets or parentheses. If the

This is for JAVA. For my assignment, I have to make a program that makes ASCII triangle shapes using either brackets or parentheses. If the user enters an even number, the triangle will be made out of parentheses. If the user enters the program with an odd number, the triangle is made of brackets. However, in both cases, the user's number determines the height and width of the triangle. I can't use a scanner to get the input from the user. I have to use this code

int size = Integer.parseInt(args[0]);

so that the input is entered when the program is called.

I have tried doing this but I always get some errors. These are some examples of working programs:

image text in transcribed

>java DrawTriangle5 C 1 JC1 1 J JJI JC java DrawTriangle 6 C) CO COCOO C

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_2

Step: 3

blur-text-image_3

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

Python BMI calculator

Answered: 1 week ago