Question: Program 2 Write a program that asks the user to input an integer, n. Use the value of n to set the size of the

Program 2 Write a program that asks the user to input an integer, n. Use the value of n to set the size of the triangles to be printed by your program to the console as shown below. If 6 was entered by the user as n, the first triangle printed by your program would look like this. @ @@ @@@ @@@@ @@@@@ @@@@@@ Then, the 2nd triangle printed by your program would look like this.: @ @@ @@@ @@@@ @@@@@ @@@@@@ The triangles should not be produced by 6 println statements, but rather by FOR loops and no more than three println or print statements in each set of loops to produce each triangle. Furthermore, a single println or print statement cannot contain more than one @ symbol in its output. (hint - use a set of nested FOR loops for each triangle to control how many times the print statements execute.) Also, just like in program 1, you may not use an array for any purpose in this program. You should print a single blank line after the first triangle so there is space between the two triangles in your console output. Submission Instructions: Please name your programs "FirstnameLastnameProgram1.java and "FirstnameLastnameProgram2.java. Put only the two .java files in a single zip file named "FirstnameLastnameAssign10.zip". Submit only this zip file as an attachment to your Assignment 10 assignment submission in Online Campus. Your facilitator will compile and run your programs using arbitrary inputs and grade it based on criteria weve discussed in class.

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!