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
How do you create an external Stylesheet in BlueGriffon
Sever21 [200]
Go to panel and select stylesheet. Hope this helped:)
5 0
3 years ago
Que es pilar en tecnologia
Semmy [17]
Wikipedia:The thermal copper pillar bump, also known as the "thermal bump", is a thermoelectric device made from thin-film thermoelectric material embedded in flip chip interconnects (in particular copper pillar solder bumps) for use in electronics and optoelectronic packaging, including: flip chip packaging of CPU and GPU integrated circuits (chips), laser diodes, and semiconductor optical amplifiers (SOA). Unlike conventional solder bumps that provide an electrical path and a mechanical connection to the package, thermal bumps act as solid-state heat pumps and add thermal management functionality locally on the surface of a chip or to another electrical component. The diameter of a thermal bump is 238 μm and 60 μm high.

The thermal bump uses the thermoelectric effect, which is the direct conversion of temperature differences to electric voltage and vice versa. Simply put, a thermoelectric device creates a voltage when there is a different temperature on each side, or when a voltage is applied to it, it creates a temperature difference. This effect can be used to generate electricity, to measure temperature, to cool objects, or to heat them.

For each bump, thermoelectric cooling (TEC) occurs when a current is passed through the bump. The thermal bump pulls heat from one side of the device and transfers it to the other as current is passed through the material. This is known as the Peltier effect.[1] The direction of heating and cooling is determined by the direction of current flow and the sign of the majority electrical carrier in the thermoelectric material. Thermoelectric power generation (TEG) on the other hand occurs when the thermal bump is subjected to a temperature gradient (i.e., the top is hotter than the bottom). In this instance, the device generates current, converting heat into electrical power. This is termed the Seebeck effect.[1]

The thermal bump was developed by Nextreme Thermal Solutions as a method for integrating active thermal management functionality at the chip level in the same manner that transistors, resistors and capacitors are integrated in conventional circuit designs today. Nextreme chose the copper pillar bump as an integration strategy due to its widespread acceptance by Intel, Amkor and other industry leaders as the method for connecting microprocessors and other advanced electronics devices to various surfaces during a process referred to as “flip-chip” packaging. The thermal bump can be integrated as a part of the standard flip-chip process (Figure 1) or integrated as discrete devices.

The efficiency of a thermoelectric device is measured by the heat moved (or pumped) divided by the amount of electrical power supplied to move this heat. This ratio is termed the coefficient of performance or COP and is a measured characteristic of a thermoelectric device. The COP is inversely related to the temperature difference that the device produces. As you move a cooling device further away from the heat source, parasitic losses between the cooler and the heat source necessitate additional cooling power: the further the distance between source and cooler, the more cooling is required. For this reason, the cooling of electronic devices is most efficient when it occurs closest to the source of the heat generation.

Use of the thermal bump does not displace system level cooling, which is still needed to move heat out of the system; rather it introduces a fundamentally new methodology for achieving temperature uniformity at the chip and board level. In this manner, overall thermal management of the system becomes more efficient. In addition, while conventional cooling solutions scale with the size of the system (bigger fans for bigger systems, etc.), the thermal bump can scale at the chip level by using more thermal bumps in the overall design.

4 0
3 years ago
Congress are smart becuase.....
spin [16.1K]

Answer:

If we are talking about government then they are smart bc of there two house policies, both are equal yet super unique. They make sure each state has an equal voice in the senate.

5 0
3 years ago
Read the excerpt below and answer the question.
zysi [14]

Answer:

Agreed

Explanation:

8 0
3 years ago
Zachary is a member of Future Business Leaders of America at his school and is competing in the Impromptu Speaking competition.
Scrat [10]

Answer:

c start off with a story

Explanation:

I just took the test

4 0
3 years ago
Read 2 more answers
Other questions:
  • how do you set up a slide show to play continuously, advancing through all slides without requiring your interaction? A. Click S
    9·1 answer
  • Guardrails are often used by employers to protect workers from falls. How high must the top guardrail be above the working surfa
    12·1 answer
  • Which of the following would be an example of a loss of record integrity in a
    12·1 answer
  • The___provides access to the internet; may also be internal
    11·1 answer
  • During prereading, it is not important to pay attention to visual aids.<br> T f
    15·2 answers
  • If an occupation is projected to decline by 7% over the next 10 years, how would you rate the job outlook?
    12·1 answer
  • Which term is defined as an exploit that takes place before the security community or software developer knows about the vulnera
    12·1 answer
  • We combine the three binary bits 1, 0, and 1 to form 101 in order to represent the number 5. What does the leftmost 1 in 101 mea
    15·1 answer
  • What does the top level domain in a url inducate? A. The organization or company that owns the website. B. The organization or c
    6·2 answers
  • Your personal opinion about what a "successful" console in the future will need to include to sell well. How have the changes in
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!