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
Allisa [31]
3 years ago
10

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). HOWEVER: if any value read in is not valid input, just print the message "INVALID". Valid input for operatorsOnCall is any value greater than 0. Valid input for callsReceived is any value greater than or equal to 0.
Computers and Technology
1 answer:
Sergio [31]3 years ago
8 0

Answer:

#include <stdio.h>

int main()

{

   int callsReceived, operatorsOnCall;

   scanf("%d", &callsReceived);

   scanf("%d", &operatorsOnCall);

if(callsReceived>=0 && operatorsOnCall>0)

{

   printf("%d",callsReceived/operatorsOnCall);

}

else

{

   printf("INVALID") ;

} }

Explanation:

The programming language to use here is C.

There is an int type variable named callsReceived    

Another int type variable is operatorsOnCall

scanf is used to read values into callsReceived and operatorsOnCall

printf is used to print the number of calls received per operator which is found by dividing the calls received with the operators on call i.e. callsReceived / operatorsOnCall

Here the callsReceived is the numerator and should be greater than or equal 0 and operatorsOnCall is the denominator and should be less than 0. So an IF condition is used to check if the value stored in operatorsOnCall is greater than 0 and if the value stored in callsReceived is greater than or equal to 0 in order to precede with the division. AND (&&) logical operator is used to confirm that both these conditions should  hold for the IF statement to evaluate to TRUE.

In case the input is not valid, the else part is displayed which means that the message INVALID will be displayed.

In C++ cin is used to read from callsReceived and operatorsOnCall and cout is used to display the results of division or the INVALID message in case the IF condition is false. Rest of the code is the same.

cin >> callsReceived;

cin >> operationsOnCall;

if(callsReceived>=0 && operatorsOnCall>0)

   cout << (callsReceived/operationsOnCall);

else

   cout << "INVALID";

You might be interested in
Businesses that conduct telemarketing are required to access the Do-Not-Call Registry every _______ in order to maintain an upda
densk [106]

Businesses that conduct telemarketing are required to access the Do-Not-Call Registry every 31 days in order to maintain an updated database of people.

<h3>What telemarketing firms do?</h3>

The act of telemarketing is known to be the act talking to potential or existing customers through the use of a telephone.

Conclusively, Note that Telemarketing can help a business firm to promote or boast their products or services, make their customer database stronger, bring about a lot of leads and appointments and others.

Learn more about telemarketing from

brainly.com/question/25974538

6 0
2 years ago
WILL UPVOTE YOUR ANSWER PLEASE HELP ME!
Sedaia [141]
The answer should be D
5 0
3 years ago
Transaction processing systems are primarily used to automate business processes. Automation increases efficiency and effectiven
snow_lady [41]

Answer:

A.Costs

Explanation:

Transaction processing systems are used in business for operational support. This information system processes data as transactions usually in automated manner.

Automation causes efficiency and reduced human intervention, which will end up <em>reduced operational costs</em>.

8 0
3 years ago
College
stiks02 [169]

Answer:

Read Technical Books. To improve your technical skills and knowledge, it's best to read technical books and journals. ...

Browse Online Tutorials. ...

Build-up online profile. ...

Learn new Tools. ...

Implement what you learned. ...

Enrich your skillset. ...

Try-out and Apply.

3 0
3 years ago
Server 2016 is compatible for Powershell 5.0 State True or False.
Svetllana [295]

Answer:

True

Explanation:

Powershell is a command line administrative tool which ships with Windows. It is heavily integrated with the dotNET framework.

Powershell 5.0 is compatible with Windows 2016 however by default Windows 2016 comes with next higher version , namely 5.1 .

Powershell 5.0 is also compatible with Windows Server 2019, Windows Server 2012, Windows Server 2008 R2 SP1 , Windows 10, Windows 8.1 and Windows 7.

8 0
3 years ago
Other questions:
  • Write a statement that declares a prototype for a function printArray, which has two parameters. The first parameter is an array
    10·1 answer
  • If Chris has a car liability insurance, what damage would he be covered for
    10·1 answer
  • During a night flight, you observe a steady red light and a flashing red light ahead and at the same altitude. What is the gener
    11·1 answer
  • The _____ is a blinking vertical line that indicates where the next typed character will appear. scroll box sheet tab insertion
    7·1 answer
  • Among object-oriented languages, one feature that varies considerably is whether the language allows multiple inheritance. C++ d
    5·1 answer
  • What is a characteristic of tasks in Outlook?
    10·2 answers
  • What is computer generation.<br>name that generations ​
    9·2 answers
  • How are Earth's plates made?
    14·1 answer
  • Cars are only as safe as their driver, so __ is your bet to lower your risk.
    15·1 answer
  • When is it appropriate to utilize the nat network connection type?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!