Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Correct my code. My code doesn't print the following output. Code should be in Java. Output: E E D E D C E D

Please Correct my code. My code doesn't print the following output. Code should be in Java.

Output:

E

E D

E D C

E D C B

E D C B A

My Code:

public class Main { public final static int SIZE=5; public static void main(String[] args) { char alph; for(int i=1; i<=SIZE; i++) { alph='E'; for(int j=1; j<=i; j++) { System.out.printf("%c ",alph--); } System.out.printf(" "); } } }

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

Nested Relations And Complex Objects In Databases Lncs 361

Authors: Serge Abiteboul ,Patrick C. Fischer ,Hans-Jorg Schek

1st Edition

ISBN: 3540511717, 978-3540511717

Students also viewed these Databases questions

Question

Does a focal firm have the most influence in a supply chain?

Answered: 1 week ago

Question

5. Identify and describe nine social and cultural identities.

Answered: 1 week ago

Question

2. Define identity.

Answered: 1 week ago

Question

4. Describe phases of majority identity development.

Answered: 1 week ago