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
Mademuasel [1]
3 years ago
6

What is output by the following program? int i = 7; while (i>=2){System.out.print (i +""); if ((i%3) == 0){ i +2; } else { i/

=2;}}
Computers and Technology
1 answer:
stiks02 [169]3 years ago
6 0

Answer:

The correct answer to this question is: "this program give an error".

int i = 7; //declare a variable(i) and assign value.

while (i>=2) //use loop and check condition.i greater then equal to 2.

{

System.out.print (i +""); //print value of i.

if ((i%3) == 0) //hold remainder

{

i +2; //error.

}

else

{

i/=2; //hold Quotient

}

}

Explanation:

In the above program, there is an error in the if block because it is not the correct way to declare. To use the variable from the correct output we use a variable like this.

Example

int i = 7;

//declare a variable(i) and assign value.

while (i>=2)

//use loop and check condition.i greater then equal to 2.

{

System.out.print (i +""); //print value of i.

if ((i%3) == 0) //hold remainder

{

i =i+2;

}

else

{

i/=2; //hold Quotient

}

}

Output: 732

You might be interested in
What is the difference between a status bar, title bar, and tabs?
Finger [1]

Answer:

Status Bar: a horizontal window at the bottom of a parent window in which an application can display various kinds of status information. The status bar can be divided into parts to display more than one type of information. The following screen shot shows the status bar in the Microsoft Windows Paint application.

Title Bar: horizontal bar at the top of a window, bearing the name of the program and typically the name of the currently active document.

Tabs: a tab is a clickable area at the top of a window that shows another page or area

7 0
2 years ago
What are some of the opportunities that the stem program offers?
Vlada [557]

Science, technology, engineering, and mathematics (STEM) programs open the door to many different careers, including opportunities in engineering, science, and research. STEM professionals can explore diverse fields like aeronautics and biochemistry. Some STEM students also apply their technical knowledge in law, politics, and education.

Information obtained via: https://www.bestcolleges.com/careers/stem/

7 0
2 years ago
The item in this illustration that is highlighted is the _____. quick access tool bar view buttons status bar zoom control
tiny-mole [99]

Answer: scrollbar

Explanation:

7 0
3 years ago
Read 2 more answers
Can you anyone please help me​
Yuliya22 [10]

Answer:

Option C I think

3 0
2 years ago
How many grams are in 100 pounds?
stepan [7]

Answer:

45359.2 grams are in 100 pounds

Explanation:

Hope this helped, Have a Wonderful Day!!

3 0
2 years ago
Read 2 more answers
Other questions:
  • How do you increase the amount of data in a sampled Google Analytics report?
    8·1 answer
  • The ________________ command tests connectivity by sending an echo request to a remote computer.
    14·1 answer
  • Assume that a function with this header: function amountSaved(price, discountRate, salesTaxRate) already exists. Write a single
    14·1 answer
  • Design and implement an algorithm that gets a list of k integar values N1, N2,...Nk as well as a special value SUM. Your algorit
    10·1 answer
  • What are ip addresses? why are these important for forensic scientists?
    5·1 answer
  • 1. Which sentence best expresses the main idea
    12·1 answer
  • Explain the bad effect and good effect of mobile phone and internet.<br>​
    15·2 answers
  • Define two benefits to members of the community of replacing the printed copy with an online version.
    5·1 answer
  • How will technology help people with disabilities become more transportation independent?.
    5·1 answer
  • What do hard disk drive use to store data
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!