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
The range of an area where users can access the Internet via high-frequency radio signals transmitting an Internet signal from a
Rama09 [41]

Answer:

A hot spot

Explanation:

Q:

The range of an area where users can access the Internet via high frequency radio signals transmitting an Internet signal from a wireless router is known as a _____. A) HotspotB) PAN…

A:

A) hotspot Bluetooth is for short distance and pan is Personal area networks (PANs) connect an individual's personal devices

4 0
2 years ago
A type of specialty processor devoted exclusively to protecting your privacy.
drek231 [11]
 Cryptoprocessor would be it.
8 0
3 years ago
Read 2 more answers
Focusing on a target market makes it harder to develop products and services that specific groups of customers want.
Sloan [31]

Answer:

ikr so true

Explanation:

5 0
3 years ago
________ can include computer viruses, trojan horse programs, worms, exploit scripts, and toolkits
Volgvan
All threats can include computer viruses, Trojan horse program, worms, exploit scripts and toolkit.
<span />
4 0
3 years ago
To ensure that the original value of an argument passed to a method remains unchanged after returning from the method, you shoul
lakkis [162]

Answer:

false

Explanation:

A reference parameter passed into the method can be changed by the method, when the method changes all of a parameter's variables, the parameter will keep the changes after the method is returned.

4 0
3 years ago
Other questions:
  • What is the main difference between a literacy society and a digital Society
    9·1 answer
  • How many bits must be “flipped” (i.e., changed from 0 to 1 or from 1 to 0) in order to capitalize a lowercase ‘a’ that’s represe
    11·1 answer
  • But this time use 16 kib pages instead of 4 kib pages. what would be some of the advantages of having a larger page size? what a
    11·1 answer
  • Access Control can be defined as putting controls (or countermeasures) in place to help achieve information security goals. Whic
    13·2 answers
  • Which of the following is caused by wind erosion?
    14·2 answers
  • A user is implementing security on a small office network. Which two actions would provide the minimum security requirements for
    10·1 answer
  • A ________ is a very large general-purpose computer that is capable of performing very many functions as if these are done simul
    8·1 answer
  • How should font appear in a slide presentation compared to the font in a document
    7·1 answer
  • Translate the following C++ program to MIPS assembly program. *Please explain each instruction of your code by a comment and sub
    5·1 answer
  • Write a program that reads a list of integers, and outputs the two smallest integers in the list, in ascending order. The input
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!