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
OLga [1]
3 years ago
13

Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values

into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer division with truncation will do). HOWEVER: if any value read in is not valid input, just print the message "INVALID".
Computers and Technology
1 answer:
erik [133]3 years ago
3 0

Answer:

The code to this question can be given as:

Code:

int callsReceived,operatorsOnCall;    //define variable  as integer

Scanner ob= new Scanner(System.in);    

//create object of scanner class for user input

System.out.println("Insert the value of callsReceived");  //print message.

callsReceived = ob.nextInt();    //input value.

System.out.println("Insert the value of operatorsOnCall"); //print message.  

operatorsOnCall = ob.nextInt();    //input value.

if (operatorsOnCall == 0)  //check number  

{

System.out.println("INVALID");   //print message.

}

else

{

System.out.println(callsReceived/operatorsOnCall);   //print value.

}

Explanation:

In the above code firstly we define 2 integer variable that name is already given in the question. Then we create the scanner class object for taking user input. Then we print the message for input first and second value from the user. then we use conditional statement. If the second variable that is  operatorsOnCall is equal to 0. So It print INVALID. else it divide the value and print it.

You might be interested in
I am a non-volatile type of built-in memory. I store my contents long-term. My job is to store critical programs that the comput
AlexFokin [52]

Answer:

read only memory (ROM)

Explanation:

Examples of non-volatile memory include read-only memory (see ROM), flash memory, most types of magnetic computer storage devices (e.g. hard disks, floppy discs and magnetic tape), optical discs, and early computer storage methods such as paper tape and punched cards.

7 0
3 years ago
What kind of cable would you use to connect a network printer to the soho router if you were using a wired connection to the net
Ksivusya [100]

Answer:

A) Ethernet

To Connect the Printer to a Wired (Ethernet) Network

<h3>what is the process of connecting a network printer to the SOHO router?</h3>
  • Connect one end of an Ethernet cable to the Ethernet port on the back of the printer, then connect the other end of the cable to a correctly configured network port, switch or router port.
  • Connect the Printer to a Router.

To learn more about ethernet, refer

to brainly.com/question/24621985

#SPJ4

4 0
2 years ago
To create a presentation completely by yourself, which option do you use?​
zlopas [31]

Answer: use Microsoft Power Point

Explanation:

Set up a self-running presentation

To set up a PowerPoint presentation to run automatically, do the following:

On the Slide Show tab, click Set Up Slide Show.

Under Show type, pick one of the following:

To allow the people watching your slide show to have control over when they advance the slides, select Presented by a speaker (full screen).

8 0
3 years ago
Somehow I lost 1000 points!!! Does anyone know what happened? Is it possible that I was hacked? ​
Dima020 [189]

Answer:

Explanation:

You most likely lost 1000 points because you cheated to get them if not there is a possibility you were.

6 0
3 years ago
Read 2 more answers
System analysis and design
Oksana_A [137]

Answer:

teachers go hard on you dont they

Explanation:

5 0
4 years ago
Other questions:
  • Program planning for the best may include therapy, effective discipline strategies, crisis treatment, and/or family counseling.
    9·2 answers
  • In terms of in-house custom engines versus third-party engines (like Unity), what has changed today from decades ago, and why?
    8·1 answer
  • The set of rules for how computers talk to one another
    6·1 answer
  • Which of the following should you NOT do when using CSS3 properties to create text columns for an article element? a. make the c
    12·2 answers
  • Two words are a ""reverse pair"" if each is the reverse of the other. Write a program that finds all the reverse pairs in the wo
    12·1 answer
  • Write a java program that declares an array "alpha" of 50 elements of type "double". Initialize the array so that the first 25 e
    11·1 answer
  • In Java please.
    13·1 answer
  • In c++ when you create a class and you don't want to put the class and the main program in one source file and let's say you cre
    14·1 answer
  • . In many instances an IP address is used to access a server rather than a URL because a URL is more difficult to set up and eas
    10·1 answer
  • Lyla is writing a program that uses a recursive method. Why might she want to use a recursive helper method?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!