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
Tatiana [17]
3 years ago
12

Define an enumeration type triangleType that has the values scalene, isosceles, equilateral, and noTriangle. Write a function tr

iangleShape that takes as parameters three numbers, each of which represents the length of a side of the triangle. The function should return the shape of the triangle. (Note: In a triangle, the sum of the lengths of any two sides is greater than the length of the third side.) Write a program that prompts the user to input the length of the sides of a triangle and outputs the shape of the triangle.
Computers and Technology
1 answer:
Brums [2.3K]3 years ago
6 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int side1=0;

   int side2=0;;

   int side3=0;

cout <<"Enter side one measurement";

cin >> side1;

cout <<"Enter side two measurement";

cin >> side2;

cout <<"Enter side three measurement";

cin >> side3;

if(side1+side2>side3||side1+side3>side2||side2+side3>side1){

if (side1==side2 && side2==side3)

{

   cout <<"equilateral triangle"<<endl;

}

else if(side1==side2||side2==side3||side1==side3){

   cout <<"Isosceles triangle"<<endl;

}

else{

      cout <<"scalene triangle"<<endl;

}

}else{

   cout<<"No triangle";

}

   return 0;

}

Explanation:

The code is written in c++. It takes measurements of each side from users as input and check the types of triangle based on the following formula.

1. Equilateral Triangle

If all sides of a triangle are equal than it's an equilateral triangle.

2. Isosceles Triangle

If any two  sides of a triangle are equal than it's an Isosceles triangle.

3. Scalene Triangle

If all the sides of a triangle are of different length than it's an Scalene triangle.

In a triangle the sum of two sides is greater than third side otherwise it's not a triangle.

You might be interested in
5 differences between a regular mouse and a gaming mouse​
alexdok [17]

Answer:

A gaming mouse has more buttons to keybind to while a regular mouse is simpler

Explanation:

6 0
2 years ago
Together with some anthropologists, you’re studying a sparsely populated region of a rainforest, where 50 farmers live along a 5
Varvara68 [4.7K]

Answer:

Explanation:

Farmers are always both directly and indirectly connected to each other

Their network is mostly strong

Networks become weak only on the edges (ends) of the river but doesn't completely dimnish

With the available network length, the center of river bank forms the strongest network of all and becomes a key player in defining the balance property of overall network

The network is very well structurally balanced and we can see that through the below image

20 miles 10 20 30 40 50

See attachment file for diagram

Considering the total length of river as 50miles and and the center of the whole length will be at 25th mile. From that point, if we consider a farmer will be be having friends for a length of 20miles both along upstream and downstream.

By this he'll be in friend with people who are around 80% of the total population. As me move from this point the integrity increases and this results in a highly balanced structural network.

6 0
3 years ago
If you want to prioritize downloads of your mobile app instead of visits to your mobile site, you should: a) add a sitelink exte
scoray [572]

Answer:

create a Universal App campaign

3 0
3 years ago
Power point how to insert diamond symbol
IceJOKER [234]
You got to "insert" and then you go to "shapes" and then you find the symbol you like and you drag and drop it onto the page. Then you can resize to the size and angle you would like it at.
4 0
3 years ago
HELP I WILL GIVVE BRAINLY AND 15 POINTS
levacccp [35]

Answer:

Because someone was hittting the space bar in the message instead of typing letters and numbers

Explanation:

Because they were bored or it was a glitch

4 0
3 years ago
Other questions:
  • Wide area networks are defined by their ability to
    14·2 answers
  • When naming a file to upload into an assignment in blackboard, it is okay to use special characters?
    13·1 answer
  • What component of Kerberos is responsible for storing keys for encrypting and decrypting data in the authentication process?
    13·1 answer
  • Select the correct answer
    14·1 answer
  • Como podemos calcular a média dos valores da Tabela acima no Excel? Assinale a alternativa correta
    11·1 answer
  • Transborder data flow (TDF) restricts the type of data that can be captured and transmitted in foreign countries. True or False
    12·1 answer
  • Pls help have absolutely no clue how to delete this
    12·2 answers
  • The director of security at an organization has begun reviewing vulnerability scanner results and notices a wide range of vulner
    11·1 answer
  • How do you create a CA file? short answer
    8·1 answer
  • Suppose we used an internet addressing protocol that used 4 bits to encode a single address. How many devices would be supported
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!