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
uranmaximum [27]
3 years ago
10

3. Write a program to find the area of a triangle using functions. a. Write a function getData() for user to input the length an

d the perpendicular height of a triangle. No return statement for this function. b. Write a function trigArea() to calculate the area of a triangle. Return the area to the calling function. c. Write a function displayData() to print the length, height, and the area of a triangle ( use your print string) d. Write the main() function to call getData(), call trigArea() and call displayData().
Computers and Technology
1 answer:
hjlf3 years ago
4 0

Answer:

The program in C++ is as follows:

#include<iostream>

using namespace std;

void displayData(int height, int length, double Area){

   printf("Height: %d \n", height);

   printf("Length: %d \n", length);

printf("Area: %.2f \n", Area);

}

double trigArea(int height, int length){

double area = 0.5 * height * length;

   displayData(height,length,area);

   return area;

}

void getData(){

   int h,l;

   cin>>h>>l;

   trigArea(h,l);

}

int main(){

   getData();

   return 0;

}

Explanation:

<em>See attachment for complete program where comments are used to explain the solution</em>

Download cpp
You might be interested in
Encapsulation is a form of information hiding and an important characteristic of object-oriented programming. When a programmer
Ostrovityanka [42]
<h2>Answer:</h2>

There are a whole lot of encapsulation or information hiding examples in the Bible. Here are about 3 of them:

i. <em>The parables of Jesus</em>. Many times Jesus spoke in parables to teach His disciples and until He's explained they would not get the meaning.

ii. <em>The interpretation of dreams by Joseph</em>. A noticeable example is the one of the baker and the butler in Genesis 40. Each of them - the butler and the baker - both had a dream but the actual meaning and interpretation of those dreams were not known by them.

iii. <em>Peter walking on water</em> is yet another example of encapsulation. He was only following the instruction of the master. How he was able to walk on water was a mystery to him. Only Christ the master knew how. Encapsulation.

3 0
3 years ago
You have a multi-domain Windows Server 2016 forest. You need to make a shared folder available to users from several domains. Wh
Darina [25.2K]

Answer:

Universal

Explanation:

The active directory has the following group scopes based on the level the group will be granted permission;

Universal

Global

Domain Local

With the Universal group all accounts within the domains located in the network forest can be added as well as Global groups and Universal groups within the same forest can be added. Members in the Universal group can be granted permissions to the resources on any domain located in the forest.

6 0
3 years ago
In the past, data was transferred from OTLP databases to data warehouses periodically, say once a month or even once a week. Now
Vinvika [58]

Answer:

Active is the correct answer of this question.

Explanation:

In active database is a database that contains a tournament-driven infrastructure that can adjust to circumstances within the database and beyond. Alternate  include safety tracking, contacting, collecting and approving information.A move is towards active or real-time data storage so that applications can evaluate and help decision making use of current data.

3 0
4 years ago
Combustion is an example of to energy conversion.
Marizza181 [45]
If this is a true or false question I would say true... but I dont know I’m confusion <3
7 0
3 years ago
you are researching the Holocaust for a school paper and have located several Web sites for information. In a paragraph of no le
jeka94
1. .com .org .edu those have a big part because .com is profit and .org is non profit. 
2. It shows who wrote it 
3. It shows a bio of who wrote it (So you know their actually qualified) 
4. And it has sources to back up for what they say.
7 0
4 years ago
Other questions:
  • If a method writes to a file it should start out like (fill out the blank, what should you write after the parameters in the met
    12·1 answer
  • Question 2: Sum of consecutive odd View Past Answers No past answers. Write a program which asks user to enter an integer n, cal
    8·2 answers
  • If you enjoy exploring,"what would happen if"types of questions and activities,a career in science or technology might be a good
    7·1 answer
  • Graphic Designer A says that a halftone is an image created from a photograph and is comprised of a
    8·2 answers
  • Sam would like to install a new application on every computer in his SOHO network. All the computers are currently connected in
    15·1 answer
  • Pop3 allows users to fetch and download e-mails from a remote mailbox. does this mean that the internal format of the mailboxes
    14·1 answer
  • The following is a mock-up of a Battleship game board. The square with a X marks the position of a battleship.
    13·1 answer
  • Which item can you add using the tag?
    10·2 answers
  • So has anyone opened the link/file those people are giving out as answers? Like what are they, viruses, answers, nothing??? Some
    9·2 answers
  • confidentiality ensures that only those with the rights and privileges to access information are able to do so.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!