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]
2 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:
hjlf2 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
Minerals can form deep inside Earth’s crust by
ipn [44]

ANSWER:

Minerals can form deep inside earth's crust by the crystallization of melted materials. There are two ways on how minerals are formed: crystallization of melted materials and the crystallization of materials dissolved in water.

Hope this helps!

5 0
2 years ago
These things are commonly found on the front of desktop computer cases:
jok3333 [9.3K]

USB ports, headphone jack/microphone port, and of course, a power button.

3 0
3 years ago
Types of antivirus explain them
Veronika [31]

Answer: an antivirus is a type of program designed  to protect computers from  viruses, spyware, botnets, rootkits, keyloggers and such. There are many versions and types of anti-virus programs which can be very helpful.

Such as:

Norton.

Kaspersky.

Ad Aware.

AVG

Mc Afee

Hope this helps u...

Explanation:

3 0
3 years ago
Analysts use _____ to show the objects that participate in a use case and the messages that pass between the objects over time f
ch4aika [34]

Answer:Sequence diagrams

Explanation: Sequence diagram is the diagram that displays about the connection of the objects in a sequential manner. The sequence depicted through the vertical lines in parallel form was about the object function and the horizontal line showed interaction between them for the exchange of the information.

Other options are incorrect because structural models have the infrastructure in particular format, communication diagrams depicts the exchange of information through communication and class diagram is the diagram that displays the system's class.Thus the correct option is sequence diagram.

5 0
2 years ago
Need A girl to play wit I'm bored On xbox btw or just to talk too btw be at least 12​
attashe74 [19]

Answer:

im 13 and im a girl wassup

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • In Linux, the most popular remote access tool is OpenSSH. Which software performs the same remote command line (CLI) access from
    7·1 answer
  • The buttons on a specific tab are organized into logical Ribbons. <br> T<br> F
    12·2 answers
  • What is the chief ethical concern concerning all the new sources of data available through new technological means like internet
    9·1 answer
  • Source view shows your website_____ A) exactly as it would appear when published B) approximately as it would appear when publis
    8·2 answers
  • How does the speaker feel about traditional forms of poetry
    14·2 answers
  • Suppose you are on a desert island and possess exactly 20 coconuts your neighbor Friday is a fisherman and he is willing to trad
    14·1 answer
  • Discuss the differences between a quantitative and qualitative risk analysis. Please write two paragraphs.
    8·1 answer
  • Each computer on a network requires a unique way to identify itself and to refer to other computers. This is accomplished by usi
    8·1 answer
  • . Write at least three benefits of using a network.​
    8·1 answer
  • Put these numbers in order from smallest to largest:<br> 1. 00101112<br> 2. 011110<br> 3. 011110112
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!