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
AlekseyPX
2 years ago
7

Define a function PyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the vo

lume of a pyramid with a rectangular base. Relevant geometry equations: Volume = base area x height x 1/3 Base area = base length x base width. (Watch out for integer division).

Computers and Technology
2 answers:
posledela2 years ago
8 0

Answer:

The Program to this question can be given as:

Program:

#include <iostream> //header file.

using namespace std;

double PyramidVolume(double baseLength, double baseWidth, double pyramidHeight)  //define a method PyramidVolume

{

   double baseArea,Volume; //declare variable.

   baseArea= baseLength * baseWidth;  //calculate baseArea

   Volume = ((baseArea * pyramidHeight) * 1/3);  //calculate Volume

   return Volume; //return Volume

}

int main() //define main method.

{

double x,baseLength,baseWidth,pyramidHeight; //define variable.

cout<<"Enter baseLength :"; //message.

cin>>baseLength; //input value.

cout<<"Enter baseWidth :";//message.

cin>>baseWidth;  //input value.

cout<<"Enter pyramidHeight :";//message.

cin>>pyramidHeight;  //input value.

x=PyramidVolume(baseLength,baseWidth,pyramidHeight); //calling

cout << "Volume of given value is :"<<x; //print value.

return 0;

}

Output:

Enter baseLength :1.0

Enter baseWidth :1.0

Enter pyramidHeight :1.0

Volume of given value is :0.333333

Explanation:

The description of the above program can be given as:

  • In the above c++ language program firstly we include the header file. Then we define a function that is " PyramidVolume". The return type of this function is double because it return value and in this function, we pass three-parameter that is baseLength, baseWidth, and pyramidHeight. The data type of this variable is double.
  • In this function, we define two variable that is "baseArea and Volume" that is used for holding the calculated value. The variable baseArea holds the area of the pyramid and the volume variable holds the volume of the pyramid.
  • Then we define a main function. In this function, we define four variables that is "x, baseLength, baseWidth, and pyramidHeight". The baseLength, baseWidth, and pyramidHeight variable are used to take input from the user and pass into the function. The variable x is used to hold the return value of the function and we print this variable.

zubka84 [21]2 years ago
3 0

Answer:

static double pyramidVolume(double baseLength, double baseWidth, double pyramidHeight){

  double Volume,baseArea;

  baseArea = baseLength * baseWidth;

  Volume = baseArea * pyramidHeight * 1/3;

  return Volume;

}

Explanation:

You might be interested in
How many solutions exist for the given equation?
vovikov84 [41]
Infinity amount of answers because each side can be simplified to x making any solution correct
6 0
2 years ago
Which of the following provides a suite of integrated software modules for finance and accounting, human resources, manufacturin
zzz [600]

Answer:

B) ERP systems

Explanation:

ERP which means Enterprise Resource Planning is a software that uses a centralized database, it helps to hasten business processes thereby reducing the use of manual labour. Some of the integrated software modules which it provides are:

*Finance, Accounting.

*Human resource.

*Manufacturing and production.

*Sales and marketing.

The ERP system does not really need the total involvement of a human because it has a database where information stored is used in the daily execution of tasks, it can also be used to measure the productivity and profitability of the business.

6 0
2 years ago
Your friends credit scores are 560, 675, 710, 590, and 640. Your credit score is 680. What is the difference between the average
Wittaler [7]

Answer:

560+675+710+590+640=3175/5=635

so your credit score is 45 credits better than the average of your friends

Explanation:

3 0
2 years ago
You are a technical consultant for many businesses in your community. One of your clients, a small law firm, has a single Active
stellarik [79]

COMPLETE QUESTION:

You are a technical consultant for many businesses in your community. One of your clients, a small law firm, has a single Active Directory domain. They have two servers running Windows Server 2012 R2. Both servers are configured as domain controllers while also serving as file and printer servers.This client is calling you on a regular basis because users are deleting or damaging their files. You must visit the client's site and restore the files from backup. Your client has asked you to create an alternate solution. What should you do?

Answer:

Use the Windows VSS to create shadow copies on important data

Explanation:

Volume Snapshot Service (VSS) is a service available to Windows Operating Systems which allows safe backup of open files as well as locked ones. It does this by taking a snapshot the state of the drive, this snapshot information will be provided to the backup application whenever needed. It is important to mention that this service is only available on files which are in the NTFS format

8 0
2 years ago
Suppose a switch is built using a computer work station and that it can forward packets at a rate of 500,000 packets per second,
Marina86 [1]

Answer:

When the transmission exceeds 667 packets

Explanation:

In computer networking, a packet is a chunk of data transmitted across the network. The packet size of an Ethernet network is 1.5kilobytes, while the packet size of an IP packet payload is 64 kilobytes.

A switch is a physical network device that connects nodes or workstations while communicating the packets (or frames). The I/O bus size bandwidth is 1Gbps which allows approximately 667 packets. Once this packet size is crossed, the bus becomes a limiting factor or bottle neck.

3 0
2 years ago
Other questions:
  • Computer hardware had been designed to run a single operating system and a single app, leaving computers vastly underutilized. o
    15·1 answer
  • Technician A says that the excessive length of a heater hose is intended to protect the heater core from undue stress. Technicia
    5·1 answer
  • You have been tracking your exercise routine, which involves running, lifting weights, yoga, and stretching. You want to see wha
    15·2 answers
  • If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of s
    8·2 answers
  • Assume there is a machine with the IP address 129.82.102.63 with netmask /23, and with a parent NW whose netmask is 255.255.224.
    9·1 answer
  • Write a program that removes all spaces from the given input.
    6·1 answer
  • When you add a zero to the right of a decimal number, it multiplies its value by 10 (For example, "15" becomes "150"). What simi
    10·1 answer
  • Write a MATLAB function named lin_spaced_vector with two inputs and one return value. The first input will be a single real numb
    7·1 answer
  • A colleague sent you an awesome article about using proper ergonomics while sitting at the computer. You don't have time to read
    11·1 answer
  • Describe the ways in which a computer-aided design (CAD) drawing makes the details of an image easier to understand.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!