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
WARRIOR [948]
2 years ago
14

Define a structure Triangle that contains three Point members. Write a function that computes the perimeter of a Triangle . Writ

e a program that reads the coordinates of the points, calls your function, and displays the result
Computers and Technology
1 answer:
qwelly [4]2 years ago
7 0

Answer:

The program in C++ is as follows:

#include <iostream>    

using namespace std;

int perimeter(int side1, int side2, int side3){

return side1+side2+side3;

}

struct Triangle  {

int side1;  int side2;   int side3;

};

int main(void) {

int side1, side2, side3;

cout<<"Sides of the triangle: ";

cin>>side1>>side2>>side3;

struct Triangle T;

T.side1 = side1;

T.side2 = side2;

T.side3 = side3;  

cout << "Perimeter: " << perimeter(T.side1,T.side2,T.side3) << endl;

return 0;

}

Explanation:

See attachment for complete code where comments are as explanation

Download cpp
You might be interested in
What is the name of the mvost powerful battery
sergij07 [2.7K]
Optima battery because it is stronger than a factory battery
6 0
3 years ago
why might a portrait be both a portrait of the subject and the photographer? how is a photographer present in a portrait?
Nataliya [291]
Because of the reflection on the window or mirror.
5 0
2 years ago
Read 2 more answers
What is the purpose of a fax cover sheet?
Deffense [45]
A fax cover sheet is the first sheet that gives all the information that is needed.
8 0
3 years ago
Alan wants to find an image of a car he can use in a presentation. What button should he click in the Images group to run a sear
maksim [4K]

Alan should click on the Clip Art section and then run a search by entering the keyword in the search menu.

A. Clip Art

<u>Explanation:</u>

Alan wants to find an image of a car that he can use in his presentation. It is always a good practice to include pictures and other media like videos, GIFs, and sound effects to make a presentation more engaging and interesting.

In order to include an image, Alan should click on the Clip Art section and then run a search by entering the keyword in the search menu. The clip art allows the user access to the saved images and to the internet for searching the required image.

3 0
3 years ago
What does ACCU stand for?
saveliy_v [14]
Association of C and C++ Users (ACCU) is a worldwide association of people who are interested in C, C++, and related programming languages.
3 0
3 years ago
Read 2 more answers
Other questions:
  • What need most led to the creation of the Advanced Research Projects Agency Network? DARPA wanted scientists to be able to colla
    10·2 answers
  • A smart refrigerator can use what to detect when you are running low on milk, and then send a reminder to you on a wireless.
    8·1 answer
  • If johanna wants to label the x- and y-axes, she should click Layout, then
    8·1 answer
  • Do you think that distributed OSs use a process-communication technique different from that used by desktop OSs?
    13·1 answer
  • Identify the correct sequence of steps to change the font from Verdana to Arial.
    5·1 answer
  • Java can be procedural or object-oriented when it comes to programming. What is the difference between procedural and OOP?​
    13·1 answer
  • Explain the steps in starting the MS Access from the Start Menu.​
    9·1 answer
  • Which attributes are indicators that a website is reliable? Check all that apply is up to date explains sources of data is an ed
    10·1 answer
  • David is preparing a report to show the percentage increase in population in the United States in the last five years. Which fea
    12·1 answer
  • are you in active recovery from a substance use disorder (addiction)? active recovery is defined as being free from an alcohol o
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!