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
alukav5142 [94]
3 years ago
15

Write a C program that includes a function of type double called divemaster accepts two double arguments (you must write the div

emaster function). When called, your function will return the first argument divided by the second argument. Make sure your function includes a decision statement so that it can't divide by 0--if the caller attempts to divide by 0 the function should return a value of -1.0.
Computers and Technology
1 answer:
Firlakuza [10]3 years ago
6 0

Answer:

Following is the C program to divide two numbers:

#include<stdio.h>

double divemaster (double first, double second)

{

//Check if second argument is zero or not

if(second!=0)

    return first/second;

else

 return -1.0;

}

int main()

{

printf("%f\n", divemaster(100,20));

printf("%f\n", divemaster(100,0));

}

Output:

5.000000

-1.000000

Explanation:

In the above program, a function divemaster is declared which divedes the first argument with second and return the result.

Within the body of divemaster function if else block is used to verify that the  second argument is not zero, and thus there is no chance of divide by zero error.

In main two printf statements are used to call the divemaster function. One to check normal division process and second to check divide by zero condition.  

You might be interested in
Can some please help me learn how to make a program via Binary Code?
padilas [110]
Look up binary code dictionary it will help you learn codes in letter of binary
8 0
4 years ago
There are a number of classifications that can be applied to security controls.
kodGreya [7K]

Answer:

Preventive control is not a classification that can be applied to security controls.

Explanation:

At the most basic level, we should protect resources and assets that are of value to an organization by mitigating the risk to those assets and resources. Security controls include any type of policy, technique, procedure, or solution that help mitigate risks. There are models that define security control objectives and are classified by control type and by function

By Control Type

  1. Physical control: Anything that can be touched and can be used to detect and prevent unauthorized access from adversaries and threat actors. Examples include CCTV, electric fences, Biometrics
  2. Technical controls: Examples include firewalls, AMSI solutions, IDSs and IPSs that help protect an organization’s resources and assets. They can be both hardware and software solutions.
  3. Administrative controls: These are the overall design of the protocols or guidelines that define business needs based upon the organization’s security goals that help implement a secure environment. Things like staff awareness and training are among the examples of administrative controls.

Learn more about Security Control classification

brainly.com/question/13239384

brainly.com/question/14409331

#LearnWithBrainly

5 0
4 years ago
5. When resizing an object with the Select Tool, what keyboard key should you press to make it resize equally in all directions?
Elan Coil [88]

Answer:

When resizing an object with the select tool, the keyboard key you should press to make it resize equally in all direction:

  • The Shift Key

Explanation:

  • In photoshop software, you should hold the shift key to resize the object or image so that it can be resized equally in all direction otherwise it will not resize equally.
  • In a famous presentation making software, this same method is used to resize the objects and images equally.
4 0
4 years ago
Project planning output is :
-Dominant- [34]

Answer:

A

Explanation:

The main output of Project palnning is project plan.

5 0
3 years ago
What is an umbrella of software programs that may include​ CAD/CAM, product​ routing, maintenance, and other product​ concerns?
Andrew [12]

Answer:

Product lifecycle management software

Explanation:

Characteristics.

  • Complete set of tools to establish decision criteria regarding the portfolio and simulations for  product planning.
  • It allows the standardization and automation of the processes of request of alterations in the product, controlling the  decisions, deadlines and ensuring traceability.
  • Improves efficiency in product design.
  • <em>Example SoftExpert PLM </em>is an accessible, easy-to-use and completely web solution for managing the life cycle of  products.
6 0
4 years ago
Other questions:
  • When a chart is selected, numerous customization options can be found on which Chart Tools tabs?
    11·2 answers
  • Identify the correct software or hardware applications in the passage below
    10·1 answer
  • What are 3 characteristics of syndrome E?
    13·1 answer
  • A network administrator has received the IPv6 prefix 2001:DB8::/48 for subnetting. Assuming the administrator does not subnet in
    11·1 answer
  • Your environment includes many users who print documents often. A single print device isn't sufficient. You need a "printer pool
    7·1 answer
  • Maggie is preparing a document.she wants to open the help menu to sort out a formatting problem.which key should she press to op
    15·2 answers
  • A _______ area network is a type of wireless network that works within your immediate surroundings to connect cell phones to hea
    9·2 answers
  • System.out.print();
    10·1 answer
  • Can someone help me and explain
    5·1 answer
  • Write Python code that prompts the user to guess Heads or Tails. Your code will continue to display the results and prompt the u
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!