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
By Definition, a Small Business?
Strike441 [17]

Answer:

A small business is a privately owned and operated business. A small business typically has a small number of employees.

Hope this helped you!

Explanation:

4 0
3 years ago
18. Applying what formatting option to your Excel workbook will make it easier to read when printed out?
Sergeu [11.5K]
Depending on the data all answers can be used to make it easier to read. Without more info I would go with Borders (D) since they are the best way to group the data when printed, especially if the print is in color.

Alignment would be the correct answer only if the data goes out of cell boundaries. Font Color usually makes it harder to read because of bad contrast and finally changing the Font Style has a minimal effect since the default one is already pretty readable.
7 0
3 years ago
Write a program that accepts 5 number and arrange them in ascending order​
Schach [20]
5
5 does this help?
5
5
5
7 0
3 years ago
When creating any digital work, what is the MOST important thing to remember?
kvasek [131]

Answer:

ALWAYS  double check your work

Explanation:

3 0
3 years ago
How long before a speech should you begin practicing?
hichkok12 [17]

Answer:

D

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Write a static method, getBigWords, that gets a single String parameter and returns an array whose elements are the words in the
    15·1 answer
  • What does FTP stand for?
    15·2 answers
  • How to make your keyboard sound like a piano?
    9·1 answer
  • Will give brainliest!!!!!!!!!!!!
    6·2 answers
  • Write a function that accepts an integer parameter and returns its integer square root (if it exists). The function should throw
    12·2 answers
  • ________ programming is a method of writing software that centers on the actions that take place in a program.
    8·1 answer
  • The ash and dust from a volcanic eruption can cause a ______ change in the environment.
    8·1 answer
  • PLEASE HELPPPPP ASAP, 50 POINT'S + BRAINLIEST
    14·1 answer
  • True or false, USBs are slower than RAM.
    15·1 answer
  • GRAND THEFT AUTO 5 LOLLL
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!