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
Ne4ueva [31]
4 years ago
15

public class Ex0506 { public static void main (String args[]) { int x = 2; while (x < 10) { if (x % 2 == 0) x+=3; else x+=2;

} System.out.println("x = " + x); } }
Computers and Technology
1 answer:
olga nikolaevna [1]4 years ago
5 0

Answer:

It will print x = 11

Explanation:

x starts with a value of 2 and goes inside the while loop. The loop will continue until x<10. Inside the loop, If x is even number, 3 will be added to x. Otherwise, 2 will be added. When the loop is done, x will be printed.

First iteration:

x = 2, x becomes x + 3 = 5, Is x smaller than 10? YES

Second iteration:

x = 5, x becomes x + 2 = 7, Is x smaller than 10? YES

Third iteration:

x = 7, x becomes x + 2 = 9, Is x smaller than 10? YES

Forth iteration:

x = 9, x becomes x + 2 = 11, Is x smaller than 10? NO

Stop the loop and print x

You might be interested in
Explica la importancia que tiene el plan de trabajo (cronograma) en los proyectos y porque se realiza antes de ejecutar la soluc
zysi [14]

Answer:

El plan de trabajo permite delimitar la necesidad a la cual se debe responder con una solución (<em>descripción del problema</em>), los hitos que se deben alcanzar (<em>objetivos general y específico</em>), los recursos requeridos para lograr desarrollar y aplicar la solución (<em>marco teórico</em>), los posibles beneficios derivados del proceso exitoso (<em>justificación del proyecto</em>) y una administración racional y realistas de los recursos a disposición en cuanto a disponibilidad, tiempo y personal mediante una secuenciación de tareas (i.e. <em>diagramas de Gantt</em>), todo reduce el componente iterativo inherente a diseño y producción de un producto, permite prever posibles imprevistos y mantener una perspectiva realista y una eficiencia aceptable en cuanto a presupuesto, metodologías y tecnologías a usar.

El plan de trabajo debe incluir principios de ingeniería concurrente para minimizar para manera mejor los posibles imprevistos, usualmente difíciles de manera con principios de ingeniería secuencial.

Explanation:

El plan de trabajo permite delimitar la necesidad a la cual se debe responder con una solución (<em>descripción del problema</em>), los hitos que se deben alcanzar (<em>objetivos general y específico</em>), los recursos requeridos para lograr desarrollar y aplicar la solución (<em>marco teórico</em>), los posibles beneficios derivados del proceso exitoso (<em>justificación</em>) y una administración racional y realistas de los recursos a disposición en cuanto a disponibilidad, tiempo y personal mediante una secuenciación de tareas (i.e. diagramas de Gantt), todo reduce el componente iterativo inherente a diseño y producción de un producto, permite prever posibles imprevistos y mantener una perspectiva realista y una eficiencia aceptable en cuanto a presupuesto, metodologías y tecnologías a usar.

El plan de trabajo debe incluir principios de ingeniería concurrente para minimizar para manera mejor los posibles imprevistos, usualmente difíciles de manera con principios de ingeniería secuencial.

5 0
3 years ago
Where is the risk of someone intercepting another person’s online activity the greatest?
sergey [27]

social networking site

3 0
3 years ago
100 POINTS + BRAINLYEST TO FIRST PERSON THAT IS CORRECT!!! Tomika wants to create a cell style for her workbook and share it wit
andrew11 [14]

Answer:

Go to the Home tab on the ribbon and the group Styles.

Left Click Cell Styles, then click New Cell Style and create the style.

To share it with other workbooks, use the Merge Styles function in the same group.

Explanation:

This info was for excel.

Please mark brainliest!

6 0
3 years ago
Read 2 more answers
Which of the following sentences use the subjunctive mood correctly?Check all that apply. a. Dr. Franklin wishes he were the one
vredina [299]

Answer:

a. Dr. Franklin wishes he were the one who had invented the new web application.

b. If he were willing to submit the proposal, we might win the bid.

Explanation:

The subjunctive mood is when we're talking about wishes, doubts, and possibilities, in this case, we have two examples, where Dr. Franklin wishes to invent the new web application, and the other sentence is a possibility because he believes that they can win the bid. The last example is an affirmation.

4 0
3 years ago
PLEASE-I'M STUCK!!!!!!!!!!!!!!!!!!!!!!
Blababa [14]

Answer: Input is the answer.

8 0
3 years ago
Other questions:
  • The World Wide Web consists of interconnected computer networks throughout the world that everyone can use. True or False
    13·2 answers
  • Face book requires you to change your password regularly<br> a. TRUE<br> b. FALSE
    14·1 answer
  • Question 10 of 10
    6·1 answer
  • What includes two or more private, public, or community clouds, but each cloud remains separate and is only linked by technology
    7·1 answer
  • A user purchased a new smart home device with embedded software and connected the device to a home network. The user then regist
    5·1 answer
  • Write a Python program string_functions.py that defines several functions. Each function re-implements Python's built-in string
    9·1 answer
  • The _______ within a story are the people and/or objects that the story is about
    5·2 answers
  • ARGENT !!20 POINTS <br> А ________ translates commands from a computer to draw lines on paper.
    10·2 answers
  • Choose a problem that lends to an implementation that uses dynamic programming. Clearly state the problem and then provide high-
    10·1 answer
  • When can screentips be useful? when finding a tab when looking for a command when pinning the ribbon when using a command.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!