Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer this for me. This is Java Declare an int type variable named asterisks Write a formula that adds the number of asterisks in

Please answer this for me. This is Java

Declare an int type variable named asterisks

Write a formula that adds the number of asterisks in the individual lines of the pattern and assign the asterisks variable the formula. [Hint: Total number of asterisks depends upon the number of columns of stars! This is a simple formula.]

Separated by two blank lines from the above pattern printing, print the following added information to the console arranged exactly as shown in Figure 4:

The number of * symbols in the lines of the pattern are

1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1

The total number of * symbols in the pattern is:

Figure 4

image text in transcribed

Message The total number of *symbols in the pattern is: 36

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

Students also viewed these Databases questions