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
What is the purpose of a forecast worksheet?
Liono4ka [1.6K]

Answer: It’s a

Explanation:

I got it right on edj

8 0
2 years ago
What happens to runt frames received by a cisco ethernet switch?
Nikolay [14]

Answer:

thank you sa point labyu stay safe

5 0
2 years ago
Kahnacademy sucksi am so mad i want to k ..<br> ill myself
ehidna [41]
No don’t do thattt ….
4 0
2 years ago
____ is an easy way to invitation through a web page​
Agata [3.3K]

Answer:

RSVP?

Explanation:

6 0
2 years ago
Read 2 more answers
Gregor installed a third stick of known-good RAM into his Core i7 system, bringing the total amount of RAM up to 3 GB. Within a
MA_775_DIABLO [31]

Answer:

The speed or quality was different.

Explanation:

The new ram that he installed most likely had a different rate, or was a different quality than the old ram.

5 0
3 years ago
Other questions:
  • This assignment is to read from an input file and process the data for a group of people. Your program calculates the interest a
    5·1 answer
  • The component in a disk brake unit acts as a return spring and allows the pad to move a ay from the rotor is the
    6·1 answer
  • What is a unique text-based Internet address corresponding to a computer's unique numeric IP address called
    14·1 answer
  • What expressions will initialize d with a random value such that all possible values for d are given by the inequality 1.5 ≤ d &
    8·1 answer
  • Validating the results of a program is important to a. correct runtime errors b. make sure the program solves the original probl
    8·1 answer
  • The italic button is located on the
    6·1 answer
  • According to the video, what kinds of projects would Computer Programmers be most likely to work on? Check all that apply.
    13·2 answers
  • Why is simplicity important in navigation design?
    13·1 answer
  • Determina la cilindrada total Vt en un motor de 4 cilindres de 83,6 mm de diàmetre per 91 mm de cursa.
    8·1 answer
  • Role of User Defined Iprms for creation of paten
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!