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
From the following list choose all the tasks an operating system performs.
zhenek [66]
  • <em>Manage memories - Operating system has utilities that could help users to manage their memories. Such utilities include Disk Maintenance and Disk Degfragmentation which are helpful to detect problems within your disk storage. </em>
  • <em>Works as an intermediary between the hardware and the software - OS has a special program called kernel. Basically, a kernel can recognize a command in relation to hardware. For example, when the user click on Ctrl and P keys on the keyboard, the kernel would send alert to the corresponding hardware which is the printer then do the task. </em>
  • <em>Manages which program gets access to memory and for how long - OS manages tasks. It supports multi tasking which means several processes can happen at a time. In order to do that, OS manage the computation and priorities of tasks to ensure that the user can have a good experience.</em>
4 0
3 years ago
Read 2 more answers
Write a for loop with a range function that prints the following output. Name the target variable number. 0 1 2 3 4 5
Aloiza [94]

Answer:

The program in Python is as follows:

for number in range(6):

    print(number, end=' ')

Explanation:

From the program, the range is 0 to 5.

The following line iterates from 0 to 5 using "number" as its iterating variable

for number in range(6):

This prints each number in the range followed by a blank space

    print(number, end=' ')

4 0
3 years ago
Categorize each of the following situations as a compile-time error, run-time error, or logical error. Group of answer choices m
svetlana [45]

Answer:

1. multiplying two numbers when you meant to add them - Logical Error

2. dividing by zero - Compile time error

3. semi colon at the end of a programming statement - Logical error

4. wrong in output - Run time error

5. when you should have typed a - Compile time error

6. producing inaccurate results - Logical error or Run time error

Explanation:

Compile time error is a lack in computer programming which causes to violate the rules which are defined by user in the program.

Run time error produces wrong outputs. It causes lags in the softwares which makes the output inefficient. It even causes programs crash when the output is just seconds away.

Logical error is the situation where programs completes the task assigned but with the wrong syntax. The output is produced with some abnormality.

3 0
3 years ago
What are computer virus ? Explain in detail.In your answer include symptoms and prevention (3each)
Elenna [48]

Answer:

Explanation:

A computer virus is a form of malicious software that piggybacks onto legitimate application code in order to spread and reproduce itself.

Like other types of malware, a virus is deployed by attackers to damage or take control of a computer. Its name comes from the method by which it infects its targets. A biological virus like HIV or the flu cannot reproduce on its own; it needs to hijack a cell to do that work for it, wreaking havoc on the infected organism in the process. Similarly, a computer virus isn't itself a standalone program. It's a code snippet that inserts itself into some other application. When that application runs, it executes the virus code, with results that range from the irritating to the disastrous.

Computer virus symptoms

How can you tell if a virus has slipped past your defenses? With some exceptions, like ransomware, viruses are not keen to alert you that they've compromised your computer. Just as a biological virus wants to keep its host alive so it can continue to use it as a vehicle to reproduce and spread, so too does a computer virus attempt to do its damage in the background while your computer still limps along. But there are ways to tell that you've been infected. Norton has a good list; symptoms include:

Unusually slow performance

Frequent crashes

Unknown or unfamiliar programs that start up when you turn on your computer

Mass emails being sent from your email account

Changes to your homepage or passwords

7 0
3 years ago
How do i do a mutioutput on a mac
Tcecarenko [31]
Here's what I found

To use an aggregate device with Logic:
Open Logic Pro or Logic Express.
Choose Logic Pro > Preferences > Audio or Logic Express > Preferences > Audio and select the Devices tab.
Select the Output Device drop-down menu and choose the aggregate device from the list. ...
Click Apply Changes at the bottom-right of the window.
4 0
3 years ago
Other questions:
  • PLS HELP ASAP! WILL GIVE BRAINLIEST!
    14·1 answer
  • Carol typed a memo to send to everyone in her department. To create this memo, she used a _____. spreadsheet word processor fax
    10·2 answers
  • Which of the following is not a main function within end user support?
    13·1 answer
  • ServletConfig defines a set of methods that a servlet uses tocommunicate with its servlet container.
    5·1 answer
  • Use fuel with the _____________ rating recommended by your vehicle manufacturer. A ) Converter B) Emission C) Exhaust D) Octane
    9·2 answers
  • A user reports that he cleared a paper jam and now cannot print. The technician reseats the paper and then prints a test page fr
    14·1 answer
  • Which of the following statements is NOT true about url extension?
    10·2 answers
  • All of the following are examples of service learning opportunities exept
    11·1 answer
  • I have a very quick question. So im applying for Early college and i need some future educational goals and maybe im just thinki
    6·1 answer
  • Cyberbullying can negatively impact a victim’s <br> well-being.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!