answer.
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
Alex787 [66]
2 years ago
9

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".
Computers and Technology
1 answer:
AleksandrR [38]2 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main()

{  

   int callsReceived, operatorsOnCall;

   cout<<"Enter the number of received calls:";

   cin >> callsReceived;

   cout<<"Enter the number of operators on calls:";

   cin >> operatorsOnCall;

   

   if(operatorsOnCall !=0)

       cout<< "Number of calls received per operator is: "<< callsReceived/callsReceived;

   else

       cout<<"INVALID";

   return 0;

}

Explanation:

Declare the variables

Ask the user for the inputs

Check if the second number is 0 or not. If it is not, calculate the number of calls received per operator - divide callsReceived by callsReceived, and print the result

Otherwise, print INVALID

You might be interested in
7.8.1: Function pass by reference: Transforming coordinates. Define a function CoordTransform() that transforms the function's f
Lilit [14]

Answer:

Here is the CoordTransform() function:              

void CoordTransform(int xVal, int yVal, int &xValNew, int &yValNew){

xValNew = (xVal + 1) * 2;

yValNew = (yVal + 1) * 2; }

The above method has four parameters xVal  and yVal that are used as input parameters and xValNew yValNew as output parameters. This function returns void and transforms its first two input parameters xVal and yVal into two output parameters xValNew and yValNew according to the formula: new = (old + 1) *

Here new variables are xValNew  and yValNew and old is represented by xVal and yVal.

Here the variables xValNew and yValNew are passed by reference which means any change made to these variables will be reflected in main(). Whereas variables xVal and yVal are passed by value.

Explanation:

Here is the complete program:

#include <iostream>

using namespace std;

void CoordTransform(int xVal, int yVal, int &xValNew, int &yValNew){

xValNew = (xVal + 1) * 2;

yValNew = (yVal + 1) * 2;}

int main()

{ int xValNew;

int yValNew;

int xValUser;

int yValUser;

cin >> xValUser;

cin >> yValUser;

CoordTransform(xValUser, yValUser, xValNew, yValNew);

cout << "(" << xValUser << ", " << yValUser << ") becomes (" << xValNew << ", " << yValNew << ")" << endl;

return 0; }

The output is given in the attached screenshot   

7 0
2 years ago
In a transaction-processing system (tps), if the tps database can be queried and updated while the transaction is taking place,
Alona [7]
This is called Real time processing. A Transaction Processing System (TPS) is a kind of data framework that gathers, stores, adjusts and recovers the information exchanges of an undertaking. Exchange handling frameworks additionally endeavor to give unsurprising reaction times to demands, despite the fact that this is not as basic with respect to continuous frameworks.
6 0
2 years ago
18. Which type of briefing is delivered to individual resources or crews who are assigned to operational tasks and/or work at or
GrogVix [38]

Answer: Field-level briefing

Explanation: Field-level briefing is the brief description that is provided to the crew members or operation task holders.This briefing contains the information about the work and operation that are to be followed by the workers on the site .

Field level briefing is sort of instructions to individual or group of people who will be working with their assigned duties on the incident site.

8 0
2 years ago
When seeking information on the internet about a variety of subjects the most useful place to look would be?
Anna35 [415]
Well brainly.com of course! Welcome.

For your answer, i would go with: Websites with primary source information that is verifiable and has a good reputation.
4 0
2 years ago
Read 2 more answers
1. In the Entity-Relationship Model, relationships can have attributes.
Vladimir [108]

Answer:

1. A. True

2. A. True

3. B. Conceptual.

4. Three (3).

Explanation:

An Entity-Relationship Model is used in databases to describe the structure and relationship between data elements known as entities.

1. True: In the Entity-Relationship Model, relationships can have attributes.

2. True: Attributes are the smallest division of data in ER diagram.

3. Conceptual: the level of abstraction which the Entity-Relationship Model most concerned with.

4. Consider the following relationship involving two entities, students and classes: A student can take many classes. A class can be taken by many students. The number of tables which can be used to represent this relationship in a schema is 3 because we are having three (3) parameters which are simply the students and the two entities.

In database management, the term "schema" is used to denote a representation of data.

A database schema is a structure which is typically used to represent the logical design of the database and as such represents how data are stored or organized and the relationships existing in a database management system. There are two (2) main categories of a database schema; physical database schema and logical database schema.

5 0
2 years ago
Other questions:
  • You have been tracking your exercise routine, which involves running, lifting weights, yoga, and stretching. You want to see wha
    15·2 answers
  • Consider a router that interconnects three subnets: subnet 1, subnet 2, and subnet 3. suppose all of the interfaces in each of t
    11·2 answers
  • In a graphical user interface, which is a small symbol on the screen whose location and shape changes as a user moves a pointing
    10·1 answer
  • If you were investigating login issues on a Windows computer, which portion of the Event Viewer logs would be a good place to st
    7·1 answer
  • You have verified that all your wireless settings are correct. What is most likely the problem if your laptop has recently been
    7·1 answer
  • Write a program that reads an integer and displays, using asterisks a filled and hollow square, placed next to each other. for e
    9·1 answer
  • Justin signed a rental agreement for his new condo. How long is his lease? a p e x
    15·1 answer
  • What is the value of the variable result after these lines of code are executed?
    5·2 answers
  • Directions
    6·1 answer
  • Even though Wordpress is basically free, what is the company trying to accomplish?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!