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
VashaNatasha [74]
3 years ago
10

What is the first and last value of i to be displayed by the following code snippet? int n = 20; for (int i = 0; i <= n; i++)

{ for (int j = 0; j <= i; j++) { System.out.println("" + i); } }
Computers and Technology
1 answer:
frutty [35]3 years ago
6 0

Answer:

The first value of i is 0 and last value of i is 20.

Explanation:

The following are the description of a given loop.

  • In this problem, there are two loops one is the internal loop and the other is the external loop
  • In the outer loop, the value of " i" is initialized with "0" So the first value is printed 0 in the console.
  • For one value of "i" all the inner loop is executed.
  • The loop is executed is less equal to 20 that's why the last value of "i" is printed 20 in the console window.

You might be interested in
If you wanted to create a line of code that would add ten to the user’s current score, which code should you use?
Korvikt [17]

Answer:

choice c

Explanation:

score = score + 10

because the rest doesn't make since and score == score + 10 has an extra equal sign.

7 0
3 years ago
Read 2 more answers
Wow that funny a heck
lorasvet [3.4K]

Answer:

Seriously??? Omg - Orange Trump!!

3 0
2 years ago
i have a bag of trail mix . one half of the bag is peanuts. 1/4 of the bag is chocolate candies , and 1/4 of the bag is died fru
Lelu [443]
In our bag, 1/2 is peanuts, 1/4 is chocolate and 1/4 is dried fruit.

The likelihood of drawing a chocolate therefore is 1/4. 

The likelihood of drawing a peanut is 1/2 and the likelihood of drawing a dried fruit is 1/4.

Thus, D is the correct answer because the 1/4 likelihood of drawing a chocolate is less than the 1/2 chance of drawing a peanut.
8 0
3 years ago
Assume there is an interactive math tutor. Many students take the math lessons online. At the end of each lesson, students have
Rus_ich [418]
Oh gosh oh I don’t wowiww
6 0
2 years ago
The beginning statement of a loop is called a declaration.<br> True<br> False
Ilya [14]
It is true the reason why it is true is
4 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following statements about Java Class Libraries is false: a. Java class libraries consist of classes that consist o
    9·1 answer
  • All of the following are vertical alignment options except __middle , top, center, or_bottom_.
    12·1 answer
  • Jeremy wishes to create a site map for his website. What tag will surround the URL of his home page? A. B. C. D.
    8·1 answer
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • There are many modes of remote visual communication. which is the most common mode
    5·1 answer
  • cpp g Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print fo
    15·1 answer
  • Which of these is the fastest transmission medium?
    11·2 answers
  • Stephanie would like to know the average number of regular hours worked by her employees. In cell B11, create a formula using th
    8·1 answer
  • You can perform an in-place upgrade to Windows 7 from both Windows XP and Windows Vista
    11·2 answers
  • Question 2 of 10
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!