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

Write a C++ programthat returns the type of a triangle (scalene, equilateral,or

Computers and Technology
1 answer:
bixtya [17]3 years ago
8 0

Answer:

#include<iostream>

using namespace std;

int main(){

   //initialize

   int a, b,c;

   //print the message

   cout<<"Enter the three sides of the triangle: "<<endl;

   //store in the variables

   cin>>a>>b>>c;

   //if-else statement for checking the conditions  

   if(a == b && b == c && a == c){

       cout<<"\nThe triangle is equilateral";

   }else if(a != b && b != c && a != c ){

       cout<<"\nThe triangle is scalene";

   }else{

       cout<<"\nThe triangle is isosceles";

   }

   return 0;

}

Explanation:

Create the main function and declare the three variables for the length of the sides of the triangle.

print the message on the screen for the user. Then the user enters the values and its store in the variables a, b, and c.

use the if-else statement for checking the conditions.

Equilateral triangle: all sides of the triangle are equal.

if condition true, print the equilateral triangle.

Scalene triangle: all sides of the triangle are not equal.

if condition true, print the Scalene triangle.

if both conditions is not true, then, the program moves to else part and print isosceles.

You might be interested in
Is Aerospace Engineering a more enjoyable major than Computer Engineering?
sdas [7]

Answer:

This is really all up to opinion and personal preference, meaning everyone would have their own thought on which career they’d enjoy more. However, to find out which one you’d like more you would really have to way the pros and cons. For example, if you did Aerospace engineering you would get to work with the thought of one day your aircraft could make it to the air or your spacecraft could make it to space, which in my opinion seems like it would help with your motivation and joy on the job. While the career of Computer Engineering is more practical and the work you do would be reached by far more people, if you think about it, there are more individuals purchasing computers for their everyday lives than they are purchasing airplanes.

So the decision is really up to you for which career you would like more, but I encourage you to do your research or even find people that have those careers and ask them what they think about it to help with your decision :)

3 0
2 years ago
Write a program that grades the written portion of the driver's license exam. The exam has 20 multiple choice questions (answers
Roman55 [17]

Answer:

B

Explanation:

I guess

4 0
3 years ago
Crisp-DM is an open standard process model that contains stages
Feliz [49]

Answer:

Yes, Cross Industry Standard Process for Data Mining has six stages. Business understanding, data understanding, data preparation, modeling, evaluation, and deployment.

Explanation:

3 0
3 years ago
Read 2 more answers
______is a multimodal application software platform. the centrealized and shared database system ties the entire organization to
rodikova [14]

Answer:

Enterprise Resource Planning (ERP) system

Explanation:

The ERP system is an integrated system that mediate an organization processes that include collecting, managing, interpreting business data. The data storage is centralized and the entire organization can share the same business data. The data sharing is usually achieved through a continuously updated view of business data backed by a centralized database management system. This facilitate the information flow between different departments in an organization.

7 0
4 years ago
What is the primary purpose of the destination address?
ehidna [41]

Answer:

The answer to this question is given below is the explanation section.

Explanation:

"A" option is correct

    It helps the router know where to send the packet.

4 0
3 years ago
Other questions:
  • What does a computer user need to know about programming in order to play a video game?
    6·2 answers
  • Kayle is building a web form. He has included space where users can input their phone numbers and email addresses. However, he w
    15·1 answer
  • Nascar has inserted an image into his document but needs the image to appear on its own line Which option should he choose?
    12·2 answers
  • What is a benefit of Virtualization for organizations?
    15·2 answers
  • What is the grooming process as it relates to online predators?
    12·2 answers
  • Which page feature is used in long documents to assist readers in quickly finding information in the document without having to
    11·2 answers
  • 1. Tracy is studying to become an esthetician. Give three reasons why she needs to have a thorough
    11·1 answer
  • Write a C program that reads two hexadecimal values from the keyboard and then stores the two values into two variables of type
    15·1 answer
  • SOMEONE HELP 60 POINTS!!!!! When creating business publications, these two factors must be determined before planning the layout
    8·2 answers
  • When you run your Windows Form application, what is the lifespan of a global variable (also known as a "field" or "class" variab
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!