In Chapter 1 you created a program named Triangle in which you displayed a seven-line triangle pattern like the one in Figure 6-33 by using a series of println() statements. Now, using your knowledge of loops, revise the program so that it contains no more than three output statements. WRITE A JAVA CODE   class TriangleWithLoops {     public static void main(String[] args) {         // Write your code with loops     } }

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question

In Chapter 1 you created a program named Triangle in which you displayed a seven-line triangle pattern like the one in Figure 6-33 by using a series of println() statements. Now, using your knowledge of loops, revise the program so that it contains no more than three output statements. WRITE A JAVA CODE

 

class TriangleWithLoops {
    public static void main(String[] args) {
        // Write your code with loops
    }
}
TTT
ITTTT
TTTTTTT.
TTTTTTTTT
TITTTTTTTTT.
TITTTTT
TITT
Figure 6-33 Output of
the TriangleWithLoops
application
Transcribed Image Text:TTT ITTTT TTTTTTT. TTTTTTTTT TITTTTTTTTT. TITTTTT TITT Figure 6-33 Output of the TriangleWithLoops application
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L