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
In a function name, what should you use between words instead of whitespaces?
Tom [10]
2. Identify the function of computer hardware components 
3 0
4 years ago
The set of instructions that allows a particular program to complete a task.
Savatey [412]
Interpreter is doing task to complete the task
8 0
3 years ago
How can I use Social Media to raise awareness about issues and topics that are important to me?
Rama09 [41]

Answer:

You can share fundraisers/stories/movements on your story on many platforms, post about it on any platform, follow accounts that stand for what you believe in and get involved through things that they post!

I hope I helped!

3 0
3 years ago
Read 2 more answers
In the value chain concept, upgrading IT is considered what kind of activity?
ANTONII [103]

Answer:

Upgrading IT is considered as B. Support activity

Explanation:

It is considered as support activities because they help the primary activities move smoothly and consistently.

For example, efficient communication between a particular firm and its subsidiaries will be extremely difficult without the necessary IT infrastructure, which will slow down the primary activities that are to be carried out.

6 0
3 years ago
1. Do you agree that Facebook is the best social media platform to use for interpersonal communication? Why or why not?
anzhelika [568]
Nah I don't there is a BUNCH of creeps on Facebook so no!
4 0
4 years ago
Read 2 more answers
Other questions:
  • RADIAC instruments that operate on the ionization principle are broken down into three main categories based on what?
    15·1 answer
  • How can I get a refund of my money back
    12·2 answers
  • On the UB-04 claim form, the type of bill is identified by a four-digit numerical code. The first digit is a leading zero, what
    10·1 answer
  • Which of the following does NOT describe a node?
    10·2 answers
  • PLZ HELP 100 points!!!! 1. Imagine you are a screenplay writer. Discuss some possible activities or techniques you
    10·1 answer
  • What tab on the ribbon do I go into to create new database objects in Access?
    13·1 answer
  • Disadvatage of using a computer when you don't have knowledge about it​
    14·1 answer
  • Identify the command on a local desktop CMD that will verify which group policies have been applied to the workstation. SELECT T
    12·1 answer
  • The table in columns A-C contains a list of paint color choices for a bathroom and a laundry room. What is a possible sequence o
    6·2 answers
  • The first real computer was an abacus?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!