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
kumpel [21]
3 years ago
6

Int i = 1, mult3 = 3;

Computers and Technology
1 answer:
il63 [147K]3 years ago
7 0

Answer:

3 6 18

Explanation:

<u>Code segment</u><u>:</u>

int i = 1, mult3 = 3;

while (mult3 < 20) {

// We assume the body of the while loop to be enclosed in {}

// Otherwise the code will print 3 in an infinite loop

System.out.print(mult3 + " ");

i++;

mult3 *= i;

}

Let us iterate through the while loop:

i=1 , mult3 = 3

i=2 , mult3 = 6

i=3 , mult3 = 18

i=4, mult3 = 72 ( The while loop terminates)

So the code will print out the following result:

3 6 18

You might be interested in
Choose the output result of the below code.
SIZIF [17.4K]

Answer:

B

Explanation:

When you initialize an instance of FunEvent(tags, year) and assign it to bc. The instance variables in this case are: self.tags = ["g", "ml"] and self.year = 2022. But then you alter tags, which will also change self.tags, since self.tags is a reference to the list you passed in as an argument. This is not the case when you do year=2023 because, first of all, integers are not mutable, and also because even if somehow integers were mutable, you're not changing the object in-place, you're simply changing the where the "variable" is pointing to. So for example if you did tags = ["g", "ml", "bc"] instead of tags.append("bc"), it would also not change the value of the instance variable "tags", because you wouldn't be changing the object in-place. So when you print(bc), the instance variables will be ["g", "ml", "bc"] and 2022. When you try to print an object, it call try to convert it into a string using the __str__  magic method. In this case it will return a string formatted as "Event(tags={self.tags}, year={self.year}) which will output "Event(tags=['g', 'ml', 'bc'], year=2022)" So the correct answer is B

4 0
2 years ago
What keeps unauthorized internet users out of private intranets?
Kruka [31]
I think coders put in codes. Sry if that does not help.
8 0
3 years ago
A doorknob is an example of which simple machine?
Zarrin [17]
A doorknob is an example of a:
D. Wheel and Axle. 
I hope this helped ^_^
3 0
3 years ago
Read 2 more answers
Direction. See
storchak [24]

Answer:

1.A

2.A

3.B

4.A

5.D

6.A

..............

8 0
3 years ago
Write a set of instructions (the code) to prompt the user for an int value and input it using the Scanner class into the variabl
JulsSmile [24]

import java.util.Scanner;

public class MyClass {

   public static void main(String args[]) {

     Scanner scan = new Scanner(System.in);

     int x = scan.nextInt();

     int y = scan.nextInt();

   }

}

I hope this helps!

6 0
2 years ago
Other questions:
  • The LList class is (mostly) the same one discussed in lecture, but you must write a sort() function that uses one of the three i
    8·1 answer
  • When possible, you should avoid using _________ variables in a program?
    11·1 answer
  • Although highly accurate navigational information from the GPS constellation is exploitable by adversary forces, it is unlikely
    5·1 answer
  • As a digital strategist, Jared wants to add something extra to his ads to give users more incentive to click and convert. He's c
    11·1 answer
  • A blue NFiPA label indicates: A) Health Hazard B) Special information C) Flammability D) Reactivity
    6·2 answers
  • An algorithm that could execute for an unknown amount of time because it depends on random numbers to exit a function may:______
    13·1 answer
  • The question is in the photo
    14·1 answer
  • Analyze the error in the html code :<br><br> HTML
    9·1 answer
  • Assignment 3: chabot<br>​
    13·1 answer
  • What is the answer ????​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!