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 08:00
What is the algorithm for building a binary tree program
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
After you present a proposal, the committee starts asking you questions, some beyond the strict focus of your proposal. they ask questions about implications in other fields and knowledge about other fields. you are asked to redo your proposal. what is most likely missing? breadth of material depth of material clarity of material details of material
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
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, 18.10.2019 13:00
question
Mathematics, 18.10.2019 13:00
Questions on the website: 13722360