subject

Not too sure what is wrong with the following code. I believe that it is something to do with the denominator being zero but not sure.
NOTE: in mathematics, division by zero is undefined. So, in C++, division by zero is always an error.
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).
code:
cin >> callsReceived;
cin >> operatorsOnCall;
if ( operatorsOnCall > 0)
cout << (callsReceived / operatorsOnCall );

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print. wiki presentation paint desktop publishing
Answers: 3
question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 24.06.2019 00:00
For the following example of making a peanut butter and jelly sandwich, identify which are inputs, processes, or outputs: bread scooping and spreading peanut butter plate scooping and spreading jelly finished sandwich putting two pieces of covered bread together dirty plate crumbs
Answers: 2
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
You know the right answer?
Not too sure what is wrong with the following code. I believe that it is something to do with the de...
Questions
question
History, 20.09.2019 00:30
question
Chemistry, 20.09.2019 00:30
question
Mathematics, 20.09.2019 00:30
Questions on the website: 13722360