Define a structure Triangle that contains three Point members. Write a function that computes the perimeter of a Triangle . Write a program that reads the coordinates of the points, calls your function, and displays the result

Answers

Answer 1

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


Related Questions

is used for finding out about objects, properties and methods​

Answers

Answer:

science

Explanation:

what is the best plugin for subscription sites?

Answers

Answer:

Explanation:

MemberPress. MemberPress is a popular & well-supported membership plugin. ...

Restrict Content Pro. ...

Paid Memberships Pro. ...

Paid Member Subscriptions. ...

MemberMouse. ...

iThemes Exchange Membership Add-on. ...

Magic Members. ...

s2Member.

a) Why is eavesdropping done in a network?
b) Solve the following using checksum and check the data at the
receiver:
01001101
00101000​

Answers

Answer:

An eavesdropping attack is the theft of information from a smartphone or other device while the user is sending or receiving data over a network.

Missing: checksum ‎01001101 ‎00101000

Other Questions
A number is added to of itself.If the same number is doubled,write down the final expression. Which fractions are equivalent to the fraction below? Check all that apply.9/21A.3/22B.18/42C.3/7D.3/28 What is0.4 expressed as a fraction in simplest form? Why did the U.S. fail to win the Vietnam War? Why did the author include the section "Key Dates in Forensic Toxicology"?Ato show that poison was much more common in the pastBto show that poison can be made from any plantCto show that poison takes a long time to workDto show that poison has been around for a long time Question 14 (2 points)A series of organisms listed in a way that shows which is a food source for another iscalled a(n)Awhile an)is made up of multiple connected energy paths in an ecosystem. Julie printed out a picture of each of the five members of her favorite band to decorate her bedroom door. Each picture measures 8inches by 10 inches. Once decorated, how many square inches of Julie's door will be covered by these pictures?OA.400 square inchesOB. 320 square inchesOC. 480 square inchesOD180 square inches A hotel is part of what industry?A.ServiceB.WholesalingC.SubcontractingD.CottagePlease select the best answer from the choices providedABCD Invasion in your own words sentence multiplying and simplify radicals! if u get it right Ill give brainliest (show work pls!!!) NO LINKS/FLIES PLEASE .Morgan pays $25 in monthly fees for her baseball team's uniforms and field rental. What kind of expense is the fee she pays? A. VariableB. IncomeC. FixedD. This would not be an expense. in 1906, a new bank was chartered with _ in capital stock? 36^x-2=6 solve for x 4 chef require 10 minutes to prepare 20 desserts. At this rate how many chefs are needed to prepare 75 desserts in 15 minutes?PLS HELP! PLS TELL ME HOW YOU GOT THE ANSWER. THIS IS FOR MY COUSIN. SHE NEEDS HELP. Suppose you pay $3.00 to roll a fair die with the understanding that you will get back $5.00 for rolling a 1 or a 6, nothing otherwise. What is your expected value?A. $5.00B. $1.33C. $3.00D. $3.00 Which two ratios form a proportion?A) 1/2 and 4/2B) 2/1 and 4/8C) 1/2 and 8/4D) 2/1 and 16/8 Read the sentence.A gust of wind blew her long hair into her eyes, interrupting her train of thought.This is an example of direct characterization because ita)tells a physical trait of the character.b)tells a personality trait of the character.c)shows personality through what the character does.d)shows personality through what the character thinks. 5x-6=29. What does x equal Examine the figure of two parallel lines cut by a transversal.What is the value of x? Help due in 10 minutes