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
Describe the procedure for creating a table or spreadsheet in a presentation slide.
vodomira [7]

Answer:

Select the slide that you want to insert a table on.On the Insert tab, in the Tables group, click Table, and then click Excel Spreadsheet.To add text to a table cell, click the cell, and then enter your text

Explanation:

7 0
3 years ago
Read 2 more answers
What are examples of scanning devices?
eimsori [14]

Here the examples of scanning devices :

  • Drum Scanner.
  • Handheld Scanner.
  • Flatbed Scanner.
  • Optical Character Recognition.
  • Magnetic Ink Character Recognition.
  • Image Scanner.

<h3>What is meant by scanning ?</h3>
  • A text is scanned quickly in order to find a specific piece of information. In daily life, scanning is regularly used for tasks like looking up a word in a dictionary or finding a friend's name in your phone's contacts list.
  • Scanners may basically be divided into three categories. These consist of network scanning, port scanning, and vulnerability scanning.
  • There are three different types of scanners: portable scanners, flatbed scanners, and drum scanners. While flatbed scanners are commonly used in offices and classrooms, drum scanners are mainly used in the publishing industry to print high-quality pictures.
  • Three processes make up the basic scanning process: scan, register, and detail.

Learn more about scanning refer to :

brainly.com/question/25106178

#SPJ4

4 0
1 year ago
Through the use of ____, governments can keep an eye on criminals and monitor regions in their own countries.
Tcecarenko [31]
Through the use of <span>satellite imagery</span>
7 0
3 years ago
Which of the following is not ways to fix software in windows 8
RideAnS [48]
Well, this is pretty tricky so lets define all the purposes of these

Safe mode - troubleshoots windows ; determines HARDWARE malfunctions

Check device manager - Highlights malfunctioning hardware that is connected to the P.C.

Refreshing pc - practically nothing

resetting your pc - removes all programs, files, etc. and starts as a new Windows.

I will have to go with answer C.) Refresh your P.C.
7 0
3 years ago
What is a type of machine-to-human communication?
Sonbull [250]

A. Biofeedback

Its where your body is read by a machine and you read the machine

3 0
3 years ago
Read 2 more answers
Other questions:
  • The instruction set for a microprocessor is unique and is typically understood only by the microprocessors of the same brand.
    7·1 answer
  • In 1997, two South Korean manufacturers of semiconductors, LG Semicon and Hyundai Electronics, were accused of selling dynamic r
    14·1 answer
  • You notice that somehow you have duplicate records for some of your clients in your database. What should you do?
    13·2 answers
  • A number of LC-3 instructions have an "evaluate address" step in the instruction cycle, in which a 16-bit address is constructed
    6·1 answer
  • Which of the following Internet protocols is used to request and send pages and files on the World Wide Web?
    15·1 answer
  • Under which of the following conditions will evaluating this boolean expression
    7·1 answer
  • (EASY)
    5·2 answers
  • Which key is used to indent the first line of a paragraph to the right?
    15·2 answers
  • I need le help, darn ijourneys
    10·2 answers
  • What are the main techniques used to help manage test anxiety? Check all that apply.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!