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
The one who will defeat me in this typing race I will mark the one brainliest:
fredd [130]

Answer:

yes

Explanation:

can you send the link....

5 0
2 years ago
Read 2 more answers
What was the first e-commerce service?
docker41 [41]

The first e-commerce service would be A)Banking. Hope this helps.

8 0
3 years ago
Which is a network of devices built around a person, typically within 10 meters of range?
11111nata11111 [884]

Answer:

A LAN

Explanation:

A LAN, or a Local Area Network, is a network of devices typically within 10 meters of range regardless of what it is built around.

6 0
3 years ago
A ribbon is broken into 3 parts - name them. (From Microsoft Word 2016)
BARSIC [14]

Answer:

The Ribbon is composed of three parts: Tabs, Groups, and Commands.

4 0
3 years ago
Moore's Law states that the number of transistors on an integrated circuit? increases by 20% every year
qaws [65]
Doubles every two years
3 0
2 years ago
Other questions:
  • In what ways are Outlook notes useful for personal or professional use? Check all that apply.
    13·2 answers
  • 5. Which of the following is a Windows feature that allows you to temporarily store text?
    13·2 answers
  • Consider the recursive method myprint in this code snippet: public void myprint(int n) { if (n < 10) { system.out.print(n); }
    5·1 answer
  • Your friend called and told you that he saw information about the classified XYZ program on the Internet. As a cleared employee
    14·1 answer
  • Marginal ________ shows how much money can be made if a producer sells one additional unit of a good.
    7·2 answers
  • A _____ is a climate-controlled building or set of buildings that houses database servers and the systems that deliver mission-c
    6·1 answer
  • How do you change your age on here? I accidentally put that i was 15 but i am only 13. How do I change this?
    12·1 answer
  • Create a program that generates a report that displays a list of students, classes they are enrolled in and the professor who te
    11·1 answer
  • Write a c program using loops to generate following output.
    11·1 answer
  • ASAP PLS HELP: I’ll give brainliest if you u answer them all correctly!!
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!