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
Which pair of properties apply to both sound and electromagnetic waves?
Alex73 [517]
Both waves can have interference, reflection, and diffraction.

Wave interference is a phenomenon that occurs when two waves meet while traveling along the same medium. The interference of waves causes the medium to take on a shape that results from the net effect of the two individual waves upon the particles of the medium.

Wave reflection happens when a wave reaches the boundary between one medium and another medium, a portion of the wave undergoes reflection and a portion of the wave undergoes transmission across the boundary.

Wave diffraction<span> involves a change in direction of waves as they pass through an opening or around a barrier in their path.<span> </span></span>
3 0
4 years ago
Read 2 more answers
The bullets button is available on the home tab of the ribbon in the ____ group.
Helga [31]
The bullets button is available on the home tab of the ribbon in the ____ group.
Paragraph
7 0
3 years ago
The American Standard Code for Information Interchange (ASCII) has 128 binary-coded characters. A certain computer generates dat
Kay [80]

Answer:

350 kHz

Explanation:

as there are 100,000 character per sec.

so, total number of bits per sec = 100,000 * n

= 100,000 * 7 = 700,000 bits per sec

= 700 kbps

Bandwidth (BW) = total no. of bits / 2

BW = 700 kbps/2

= 350 kHz

4 0
3 years ago
You just realized the turn signal on your vehicle is broken,
zimovet [89]

Answer:

c

Explanation:

7 0
4 years ago
Name box _________. a. Used to move horizontally or vertically within a worksheet b. A group of selected cells c. The cell refer
MA_775_DIABLO [31]

Answer:

The answer is "Option c".

Explanation:

The name box is a part of the Microsoft Excel, that provides an input box on the left side of the formula row, which is usually shown on the "working cell" address on the worksheet. It can also use the name box is to easily switch to any location in the Worksheet, and wrong choices can be described as follows:

  • In option a, It is used in worksheet but it's not a worksheet.
  • In option b, It can't select cells.
  • In option d, It is used to input a value not to identify the program.

5 0
3 years ago
Other questions:
  • Why is it unlikely that you will find the ip address 192.168.250.10 on the internet?
    15·1 answer
  • Jennifer has been hired as a temporary employee at a local college. She is given a username and password to access certain parts
    14·2 answers
  • Which of the following terms describes a type of useful and legitimate software that is distributed by a developer where they do
    10·1 answer
  • Fatal error: Class 'Drush\Commands\DrushCommands' not found in /Users/amy/testsite/Sites/acquia dev desktop/fresh-install/module
    7·1 answer
  • Text can be easily moved from one location to another using _____.
    15·1 answer
  • Andy wants to install a new Internet connection. He wants to take the fastest he can get. What are the maximum speeds for the fo
    9·1 answer
  • The process of combining rows and columns in a table is called _____.
    8·1 answer
  • A multi-national retail company has multiple business divisions with each division having its own AWS account. The engineering t
    9·1 answer
  • A single-user/single-tasking operating system allows only one user to perform one task at a time. A real-time operating system g
    13·1 answer
  • Describe s computer network that you are familiar with ?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!