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
statuscvo [17]
4 years ago
14

Write a program using integers userNum and x as input, and output userNum divided by x four times. Ex: If the input is 2000 2, t

he output is: 1000 500 250 125 Note: In Coral, integer division discards fractions. Ex: 6 / 4 is 1 (the 0.5 is discarded).
Computers and Technology
1 answer:
BaLLatris [955]4 years ago
5 0

Answer:

import java.util.Scanner;

public class Division {

   public static void main(String[] args) {

    Scanner in = new Scanner(System.in);

       System.out.println("Enter an integer");

       int userNum = in.nextInt();

       System.out.println("Enter the divisor");

       int x = in.nextInt();

           int first = userNum/x;

           int second = first/x;

           int third = second/x;

           int fourth = third/x;

       System.out.println(first+" "+second+" "+third+" "+fourth);

   }

}

Explanation:

  • In Java programming langauge use the scanner class to receive the values from the user (userNum and x)
  • Carryout integer division of userNum/x to obtain the first number
  • Repeat the sam step to obtain the second, third and fourth number
  • Output the numbers to the user
You might be interested in
Go to your Canvas course and locate the Assignment: Writing Prompt 1: Is the Internet making us Meaner?and complete the activity
Maslowich

Answer and Explanation:

The Internet is not changing anything other than making you extreme. The nice become nicer, the mean become meaner, the nice become mean, and the mean become nice. The internet just makes things easier to do. It really isn't a factor in if you are mean or not.

7 0
3 years ago
Read 2 more answers
While running a full system scan using your anti-malware software, three files have been identified as possible problems. You wa
Maksim231197 [3]

Answer: Quarentine the files

Explanation:

Hi, when an possible infected file is in quarantine, it means that is deleted from its original location and instead is putted in other location where it cannot longer affect the system. If there was a virus in the file, it is no harmless.

You can decide later if you want to delete it permanently or if not.

4 0
3 years ago
In which technique does a group rate or rank a set of information, compile the results and repeat until everyone is satisfied wi
garik1379 [7]
The correct option is DELPHI. Delphi technique is a structured and systematic method used in forecasting. The method often involve sending several rounds of questionnaires to experts. The anonymous responses are then gathered together and shared with the concerned group after each round of answers are received. 
5 0
3 years ago
True or False <br><br> MAC addresses are assigned by the router along with your IP address.
Oduvanchick [21]
True. If you look at the router it will correspond with your MAC address
4 0
3 years ago
Where else can the computer send the results of processing other than to output​
hjlf

Explanation:

it can also be sent through flashdrive

3 0
2 years ago
Other questions:
  • You can increase your efficiency by using your e-mail program's spell checker because it eliminates the need for you to proofrea
    11·1 answer
  • The flowchart shape for input or output is an oval. <br> a. True <br> b. False
    6·1 answer
  • We discussed in class the differences between Ruby and a language like Java. Based on our discussions, when do you feel it would
    11·1 answer
  • According to Gitlin, during the 1950s and 60s television production costs began to exceed the licensing fees the networks paid i
    10·1 answer
  • What do you think the need for so many different form factors and server types are?
    13·1 answer
  • Many people in modern society have the notion that hard disks can be searched in an hour and files can be recovered from inciner
    10·1 answer
  • Before using large downloaded files that are in a compressed format, it is necessary to_____ them. A) Copy B) Extract C) Open D)
    9·1 answer
  • printArray is a method that accepts one argument, an arrayof int. The method prints the contents of the array; it does not retur
    5·1 answer
  • Which graphic file format is used for commercial purposes.
    10·1 answer
  • In C++ please (read the image below for instructions)
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!