1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
den301095 [7]
3 years ago
14

Given an int variable n that has already been declared and initialized to a positive value, and another int variable j that has

already been declared, use a for loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j.
Mathematics
1 answer:
Inessa05 [86]3 years ago
7 0

Answer:

for(j = n; j > 0; j--)

System.out.print(\"*\");

Step-by-step explanation:

-A for loop is a repetition control structure.

-It allows the efficiency to write a loop that would otherwise be written a couple of times.

-The output is a single line comprising n asterisks,

-The number of asterisks printed will be equivalent to the n-value declared.

You might be interested in
HELP PLEASE!!!!!!!!!!!!!!! ASAP
evablogger [386]

AnswerASK THE TEACHER

Step-by-step explanation:

8 0
3 years ago
Help me find the value of x! 20 points!!
marta [7]
Check the picture below.

3 0
3 years ago
Please answer the following questions​
shutvik [7]

Answer:

a) 8.8 square centimetres

b) 31.8 square centimetres

c) (3a + 12) square centimetres

d) Area = (2b + 2c + 4) square centimetres

Step-by-step explanation:

a) We have to split the diagram into three separate rectangles as shown below.

The area of A:

Area = 5.3 * 1 = 5.3 square centimetres

The area of B:

Area = 3.3 * 1 = 3.3 square centimetres

The area of C:

Area = 2 * 1 = 2 square centimetres

The area of the shape is the sum of the areas of the three shapes:

Area = 5.3 + 3.3 + 2 = 8.8 square centimetres

b) We have to split the diagram into two separate rectangles as shown below.

Note:(The diagram has conflicting values for 2.6 and 2.1 but I went with 2.6 as it seems more feasible in the diagram)

The area of A:

Area = 3 * 2.6 = 7.8 square centimetres

The area of B:

Area = 6 * 4 = 24 square centimetres

The area of the shape is the sum of the areas of the two shapes:

Area = 7.8 + 24 = 31.8 square centimetres

c) The shape is a rectangle and so its area is:

Area = 3 * (a + 4) = (3a + 12) square centimetres

d) The shape is a trapezium and so its area is:

Area = 0.5(A + B)H

where A =  c cm

B = b + 2 cm

H = 4 cm

The area of the shape is therefore:

Area = 0.5 * (c + b + 2) * 4

Area = 2 * (b + c + 2)

Area = (2b + 2c + 4) square centimetres

3 0
3 years ago
Can someone answer all those questions for me? Thank you so so much! :)))
xxTIMURxx [149]
Do your hw pls no cheat
4 0
3 years ago
Help please!! &lt;3<br> Giving brainliest!
Alex777 [14]

Answer:

D) x-int (-3,0), y-int (0,2)

Step-by-step explanation:

x-intercept is where the line crosses the x-axis

y-intercept is where the line crosses the y-axis

From inspection of the graph,

x-intercept = (-3, 0)

y-intercept = (0, 2)

5 0
2 years ago
Other questions:
  • The diameter of the average cell in the human body is 1 x 10-5 meters. The diameter of a grain of sand is about 2 x 10-4 meters.
    6·1 answer
  • Which is the correct classification and decimal expansion of 5/8
    10·2 answers
  • Triangle A B C is shown. Angle A B C is a right angle. An altitude is drawn from point B to point D on side A C to form a right
    5·2 answers
  • Please help me do this question
    15·2 answers
  • You randomly select k integers between 1 and 100, inclusive. What is the smallest k that guarantees that at least one pair of th
    14·1 answer
  • There are 58 students in an art class. The day before class begins, 10.3 percent of the students cancel
    8·1 answer
  • According to the graph, is f even, odd, or neither(pic provided)?
    9·1 answer
  • What does x equal? ​
    15·2 answers
  • HELP ASAP WILL GIVE BRAINLIEST
    12·2 answers
  • STUDENT HOURS KATY 5.5
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!