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
A computer projecter is an example of a(n):<br> Input Device<br> Output Device<br> Storage Device
oee [108]

Answer:

A computer projector is an example of an output device.

Explanation:

Because it converts information into imagery humans can understand.

7 0
3 years ago
Read 2 more answers
Which tasks can be completed using the Chart Tools Design tab? Check all that apply.
Oksanka [162]

Answer:

add a title to a chart

change the way a chart looks

change the type of an existing chart

Explanation:

In Microsoft Excel, a chart tool design tab is used to design and customize the look, feel and properties of charts in order to meet the taste of a user. Charts are used generally to visually or graphically represent the data in an excel worksheet.

The tasks which can be completed using the Chart Tools Design tab are;

1. Add a title to a chart.

2. Change the way a chart looks.

3. Change the type of an existing chart.

4 0
4 years ago
Create a class called Home that contains 4 pieces of information as instance variables: county (datatype string), street (dataty
DerKrebs [107]

Answer:

class Home // create class Home

{

// instance variable declaration

string county; // variable county of string datatype

string street; // variable street of string datatype

int housenumber; // variable housenumber of int datatype

string state; // variable state of string datatype

}

Explanation:

Here we declared a class 'Home ' which consist of 4 instance variable.

The instance variable are declared inside the class.We declared  variable county,street,state as string type and housenumber as integer type.

6 0
3 years ago
What type of light comes from reflections off other objects?
lina2011 [118]

Answer:

diffused

Explanation:

Diffuse reflection is when light hits an object and reflects in lots of different directions. This happens when the surface is rough. Most of the things we see are because light from a source has reflected off it.

4 0
3 years ago
What is a type of destructive program?
VladimirAG [237]

I think it is DATABASE correct me if I'm wrong

7 0
3 years ago
Read 2 more answers
Other questions:
  • An intranet is a way for a company or organization to protect copyrighted and other important information?
    15·2 answers
  • Which ofthe following is the most correct statement about the interestsection of the indirect plan for persuasion?
    8·1 answer
  • Citing the recent increase in earnings by several computer companies, economists feel that a cycle has begun in which personal c
    13·1 answer
  • Your boss wants you to devise a way for remote contractors to be able to access the server desktop. There is one stipulation, ho
    12·1 answer
  • Rita wants to know the size of each image in a folder. Which view will help her find this information quickly?
    13·1 answer
  • Why do we need IP Addresses in order for the Internet to function properly?
    7·1 answer
  • The letters LAN stand for Area Network.
    9·2 answers
  • ก
    6·2 answers
  • A digital presence created online by an individual or organization using a digital device is called a identity.
    7·1 answer
  • This seems like a good time to ask the basic question, “How’s it going in class?” Feel free to offer constructive feedback about
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!