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
12. Which one of the following items would you be most likely to keep in a database?
AysviL [449]
The item that would be most likely to keep in a database would be the payroll records. The other items such as address book, financial statements and sales reports would not necessarily be placed in a database.

The answer would be letter A. 
3 0
3 years ago
-What does VI indicate when talking about LabView?
BaLLatris [955]

Answer:

The VI in LabView indicates c-Virtual Instrument

Explanation:

The VI in LabView is a program-subroutine. The VI stands for Virtual Instrument. The VI is composed of a Block diagram, Connector panel and a Front Panel.

4 0
3 years ago
Adding _____ will allow the user to create text as it will often appear in publications with multiple articles, such as a newspa
mart [117]
Does applications make sense <span />
5 0
3 years ago
Read 2 more answers
Urgent. I will mark you brainliest. explain why cyber warfare is a real threat.​
stellarik [79]

Answer: Cyber warfare is a real threat since being able to hack another computer especially a countries computer with lots of info in their weaknesses can lead to their downfall. Since they can even possibly if their skilled enough hack their entire data base system and leak it to the public and that wouldn't be good for them not in a single possible way. That's the reason it's dangerous not only that but also because they can access their servers; which can let them access anything online from the whole country including banking information military info which can let them know which area there gonna go to next equipment there gonna bring and where they're gonna launch missiles, bombs, even nukes if they decide to launch one. And being able to hijack the computer that launches the nukes can make the hacker launch the nuke to a different place or launch the nuke on the country trying to launch the nuke.

Explanation:

3 0
3 years ago
Read 2 more answers
The ____ of a variable is the location in memory where it’s value is stored. A. Value B. Address C. Data type D. Number
fomenos

Answer: C. Data type

Explanation:

data types are defined as the data storage format that a variable can store a data to perform a specific operation. Data types are used to define a variable before its use in a program. Size of variable, constant and array are determined by data types.

3 0
3 years ago
Other questions:
  • The email application used by Jim’s office is sending emails with viruses attached to them to user’s computers. What step should
    13·2 answers
  • Choose two browsers and compare their security features.
    5·1 answer
  • Which payment type is best if you are trying to stick to a budget?
    6·1 answer
  • Which of the following is true of how packets are sent through the Internet?
    11·2 answers
  • How many positions there are in the media and design department?
    14·2 answers
  • I need help, whoever gets it correct will get brainliest
    7·1 answer
  • Which of these statements regarding​ time-cost tradeoffs in CPM networks is​ true?
    6·1 answer
  • What is your personal definition of life? How do you appreciate life?​
    10·1 answer
  • Which of these would be the fastest transition duration?
    6·2 answers
  • Data is stored on ________ using a laser to either melt the disc material or change the color of embedded dye.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!