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

Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each number by a space.

Computers and Technology
1 answer:
Ksenya-84 [330]3 years ago
3 0

Answer:

   while(userNum>=1){

       System.out.print(userNum/2+" ");

       userNum--;

        }

Explanation:

This is implemented in Java programming language. Below is a complete code which prompts a user for the number, receives and stores this number in the variable userNum.

<em>import java.util.Scanner;</em>

<em>public class TestClock {</em>

<em>    public static void main(String[] args) {</em>

<em>    Scanner in = new Scanner (System.in);</em>

<em>        System.out.println("Enter the number");</em>

<em>    int userNum = in.nextInt();</em>

<em>    while(userNum>=1){</em>

<em>        System.out.print(userNum/2+" ");</em>

<em>        userNum--;</em>

<em>         }</em>

<em>    }</em>

<em>}</em>

The condition for the while statement is userNum>=1 and after each iteration we subtract 1 from the value of   userNum until reaching 1 (Hence userNum>=1)

You might be interested in
_____ means collecting vast amounts of data from a host of websites.
xenn [34]

Answer:

D

Explanation:

D. Web Scraping is the answer

8 0
1 year ago
Read 2 more answers
Smallest kind of computer
jeka57 [31]
I don’t know if i’m right but like Michigan Micro Mote ?
3 0
2 years ago
Read 2 more answers
A highly agitated client paces the unit and states, "I could buy and sell this place." The client’s mood fluctuates from fits of
stira [4]

Answer:

"Agitated and pacing. Exhibiting grandiosity. Mood labile."

Explanation:

The extremely frustrated user paces that system and remarks that he can purchase and trade this spot. His behavior vacillate through laughing sessions to rage outbursts. So the Pacing and Agitated. Displaying grandiosity. Behavior labile becomes the best reliable documentation of the actions of this corporation

8 0
3 years ago
Presentation software allows users to _____.
svlad2 [7]

Answer: technolyy is a graphic igneger that allows itenas to go throught...

8 0
3 years ago
Read 2 more answers
there are four stage of the product life cycle. during which of these stages do you think is the best time for a company to purc
Alisiya [41]

Maturity Stage – During the maturity stage, the product is established and the aim for the manufacturer is now to maintain the market share they have built up. This is probably the most competitive time for most products and businesses need to invest wisely in any marketing they undertake. They also need to consider any product modifications or improvements to the production process which might give them a competitive advantage. i think this would be the best time for the company to purchase an emerging technology.

7 0
3 years ago
Read 2 more answers
Other questions:
  • A Color class has a method getColorName that returns a string corresponding to the common name for the color, e.g., yellow, blue
    11·1 answer
  • HURRYYY A friend of yours has E-mailed their English paper to you so that you can proofread it. Explain the tools you would use
    15·1 answer
  • You are an interior decorator, confronted with a dark living room. To lighten the room up, you have n candles and want to build
    12·1 answer
  • i see tabs named mowed and Ramsey i tried shredding them and deleting them and ending all the processes but they start duplicati
    13·1 answer
  • If your problem is caused by a bad hardware or software installation and you get an error message the first time you restart the
    6·1 answer
  • Write a program in java that reads each line in a file, reverses its characters, and writes the resulting line to another file
    15·1 answer
  • In Word, a red wavy underline indicates a/an
    15·1 answer
  • What does ctto mean?
    11·2 answers
  • Question
    5·1 answer
  • Which of the following are benefits of designing a scalable system? choose 3 options.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!