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]
3 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]3 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
Common separators or delimiters used when converting a table to text include _______________________ , paragraph marks, or comma
Anon25 [30]

Answer:

tabs.

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users to type, format and save text-based documents.

In Microsoft Word 2019, the users are availed with the ability to edit the word document in the following view type;

I. View Mode.

II. Print Mode.

III. Drift Layout.

To easily and quickly convert text to tables in Microsoft Word, you should insert common separators between the text columns. The common separators or delimiters used when converting a table to text include tabs, paragraph marks, or commas.

Tabs or commas are used to indicate where the texts are divided into table columns while paragraph marks indicate where a new table row begins.

6 0
3 years ago
Which of the following is true of how the Internet has responded to the increasing number of devices now using the network? a) T
zalisa [80]

Answer:

A

Explanation:

The internet protocols are changed every year to adapt to the new devices that have been connected to the network. Back in the 1990s, most traffic used a few protocols.  Pv4 routed packets, TCP turned those packets into connections, SSL (later TLS) encrypted those connections, DNS named hosts to connect to, and HTTP was often the application protocol using it all.

For many years, there were negligible changes to these core Internet protocols; HTTP added a few new headers and methods, TLS slowly went through minor revisions, TCP adapted congestion control, and DNS introduced features like DNSSEC. The protocols themselves looked about the same ‘on the wire’ for a very long time (excepting IPv6, which already gets its fair amount of attention in the network operator community.)

As a result, network operators, vendors, and policymakers that want to understand (and sometimes, control) the Internet have adopted a number of practices based upon these protocols’ wire ‘footprint’ — whether intended to debug issues, improve quality of service, or impose policy.

Now, significant changes to the core Internet protocols are underway. While they are intended to be compatible with the Internet at large (since they won’t get adoption otherwise), they might be disruptive to those who have taken liberties with undocumented aspects of protocols or made an assumption that things won’t change.

8 0
3 years ago
Read 2 more answers
What does spyware do on your computer?
Morgarella [4.7K]
It's a malware, and it basically let's the person/hacker/culprit get information off your computer without the owner of the computer knowing that the person is doing it. It's often used to find keystrokes, passwords, online interaction, and other personal data.
5 0
3 years ago
True or false for a given set of input values, a nand
Katen [24]
Nand stands for "not and". The truth table for a nand is:

a b | a nand b
0 0 |      1
0 1 |      1
1 0 |      1
1 1 |      0

Hopefully this helps you answer your question.
6 0
3 years ago
_____ transparency exists when the end user or programmer must specify the database fragment names but does not need to specify
madam [21]

Answer:

The correct answer to the following question will be "Local mapping".

Explanation:

  • A data independence standard in global DBMSs where questions can be constructed without understanding the local formats. Knowledge of quotas of pieces and components is however important.
  • With the transparency of local mapping, the user wants to determine both fragment location and name of data items, keeping in mind any replication that may occur.
  • This is clearly a more complicated and time-consuming question for all the users to answer than the first. A program that only offers it the amount of transparency would be unlikely to be satisfactory to later part-users.

Therefore, "Local mapping" is the right answer.

6 0
3 years ago
Other questions:
  • The basic components of cartridges and shotshells are similar. Shot pellets and a bullet are examples of which basic component?
    13·1 answer
  • 1. Mobile devices have a _________ viewport that displays a web page content that fits within a mobile screen.
    11·1 answer
  • A typist is entering text on keyboard at the rate of 30 words per minute. if each word is 6 characters long on average, what ban
    5·2 answers
  • Write a Program in C language using arrays:
    14·1 answer
  • Identify the use of queue in the process of spooling output to a printer.
    15·1 answer
  • Which of the following is not a valid SQL command? (Points : 2) UPDATE acctmanager SET amedate = SYSDATE WHERE amid = 'J500';
    11·1 answer
  • Which of the followings is not a testingtype? [2 marks]
    8·1 answer
  • Which of these is an advantage of having multiple layers in a drawing and enables you to make changes to one part of an image wi
    14·1 answer
  • On an XBOX 360, what does it mean if you get 4 red rings on your console?
    5·1 answer
  • If a work is in the public domain… Group of answer choices its copyright has expired. it may not be used for commercial purposes
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!