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

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

Example output for userNum = 160:

Computers and Technology
2 answers:
ICE Princess25 [194]3 years ago
6 0

Answer:

while(userNum > 1){

        userNum = userNum /2;

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

     }

Explanation:

tigry1 [53]3 years ago
4 0

Answer:

Following are the Program in Java Language

import java.util.*; // import package

public class Main // Main class

{

 public static void main (String[]args) // main method

 {

int userNum; // variable decleration

Scanner sc2=new Scanner(System.in); // creating the instance of scanner class

System.out.print(" Enter the number:");

userNum=sc2.nextInt(); // Read the number by user

while(userNum/4 >= 2) // iterating the while loop

{

userNum = userNum/4;

System.out.print(userNum);// display number

System.out.print(" ");

}

}

}

Output:

Enter the number:160

40 10 2

Explanation:

Following are the description of the Program

  • Read the number in "userNum" of int type by using the instance of scanner class.
  • Iterating the while loop divided by the until the reaching value of  less then 2
  • In that while loop print the value of userNum.
You might be interested in
Write a function using statements called Print Reportl) which will take no float
Sedbober [7]

Answer:

the answer is going to be district b

5 0
3 years ago
Which of the following terms describes a product that is designed to meet humans’ physical and/or psychological needs?
Readme [11.4K]
I think it is psychological needs
8 0
3 years ago
Read 2 more answers
Should there be an agency in charge of the Internet? How would business, government, and education be impacted if the Internet w
aksik [14]
I believe the government should not be able to regulate or control the internet. The internet is a place to express and exchange new ideas. And when an agency or government starts to regulate the internet, they can prevent from view certain content.

There is something called net neutrality. Its definition can be found on Google, "the principle that Internet service providers should enable access to all content and applications regardless of the source, and without favoring or blocking particular products or websites." - Google

What that means is, that internet service providers (ISP's) should provide all content without discrimination. For example. There is two ISP's. ISP A and ISP B. ISP B does not practice net neutrality. So, when a customer has ISP B's service, he/she cannot view content from ISP A. Or whatever company or websites ISP B does not want you to view. On the contrary, ISP A practice net neutrality. ISP A provides all content for its customers. Even if ISP A doesn't like ISP B or any websites, it still allows their customers to view that content. 

I support for new neutrality. And so should you.
3 0
4 years ago
The phenomenon of transforming a somewhat stable soil into mobile material capable of rising toward Earth's surface is called __
Naya [18.7K]

Answer: Liquefaction

Explanation:

  The phenomenon of generate the liquid from the solid or gases in accordance with the dynamics fluid is known as liquefaction. It basically occur either naturally or artificially.  It is the process of transforming the stable soil into the mobile material is known as liquefaction.

The liquefaction is the process that basically occur due to the vibration and the water pressure in the surface and that cause the soil particle to loose the contact in the soil.

This can be prevented by the avoiding the bearing capacity from the liquefaction and also by control the seismic settlement in the process.

6 0
4 years ago
Write a method named decimalToBinary that accepts an integer as a parameter and returns an integer whose digits look like that n
zmey [24]

Answer:

In Java:

public static int decimalToBinary(int decimal){

int binary = 0; // initial value

int currUnitPlace = 1; // working location

while(decimal > 0) {

// put remainder in current unit place

binary += currUnitPlace * (decimal%2);

decimal /= 2; // move to next bit

currUnitPlace *= 10; // move unit place

}

return binary;

}

7 0
3 years ago
Other questions:
  • TLS is not generally compatible with SSL because:__________. 1. SSL is proprietary while TLS is open 2. SSL can interact with it
    10·1 answer
  • Phase 1 RequirementsCode submitted for Phase 1 will only have the following capability. Any additional coding will result in the
    13·1 answer
  • The __________ format is a proprietary file format defined by guidance software for use in its forensic tool to store hard drive
    15·1 answer
  • What is a good technological design?
    13·1 answer
  • Sayeed needs to ensure that his manager is up to date on his progress and wants to send a Status Report for a particular task. I
    11·2 answers
  • Encryption is the key to keeping your personal information secure online.<br><br> True<br><br> False
    11·1 answer
  • What is the difference between word processing software and presentation software​
    9·1 answer
  • What is the maximum number of characters you can have in a file name​
    8·1 answer
  • As we’ve discussed, computer programs are considered creative works and are protected by copyright. That means those programs be
    12·1 answer
  • Which of these could you use to change data into information?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!