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
Why is code tracing important when debugging?
larisa [96]

It helps reveal the flow of execution of your program, including results of in-between evaluations. In other words, you can see what your program is doing, and why it takes the decisions it is taking.

If something unexpected happens, the trace will show you the sequence of events that lead to it.

7 0
3 years ago
How do medical detectives investigate their cases?
tensa zangetsu [6.8K]

Answer:

Analyze genetic testing results to diagnose disease and study DNA evidence found at a “crime scene.” They solve medical mysteries through hands-on projects and labs, investigate how to measure and interpret vital signs, and learn how the systems of the human body work together to maintain health.

Explanation:

I answered it under the wrong part but this is same thing i put before.

4 0
3 years ago
Read 2 more answers
⦁ Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes. ⦁ What is the maximum val
timurjin [86]

Answer:

a)  There are approximately  2^32 = 4,294,967,296 possible number of the sequence. This number of the sequence does not increase by one with every number of sequences but by byte number of data transferred. Therefore, the MSS size is insignificant. Thus, it can be inferred that the maximum L value is representable by 2^32 ≈ 4.19 Gbytes.

b)  ceil(2^32 / 536) = 8,012,999

The segment number is 66 bytes of header joined to every segment to get a cumulative sum of 528,857,934 bytes of header. Therefore, overall number of bytes sent will be 2^32 + 528,857,934 =  4.824 × 10^9 bytes.  Thus, we can conclude that the total time taken to send the file will be 249 seconds over a 155~Mbps link.

Explanation:

a)  There are approximately  2^32 = 4,294,967,296 possible number of the sequence. This number of the sequence does not increase by one with every number of sequences but by byte number of data transferred. Therefore, the MSS size is insignificant. Thus, it can be inferred that the maximum L value is representable by 2^32 ≈ 4.19 Gbytes.

b)  ceil(2^32 / 536) = 8,012,999

The segment number is 66 bytes of header joined to every segment to get a cumulative sum of 528,857,934 bytes of header. Therefore, overall number of bytes sent will be 2^32 + 528,857,934 =  4.824 × 10^9 bytes.  Thus, we can conclude that the total time taken to send the file will be 249 seconds over a 155~Mbps link.

8 0
2 years ago
1. Explain what is meant by the following data types:
Colt1911 [192]
An Integer in an object that represent an int (Integer a = new Integer(3) would represent 3).

I'm not sure about Real.

A String is an object that represents a word. (String a = "dog")

Boolean

String

int

int

Hope this kind of helps
4 0
3 years ago
Do you think the current video game industry is likely to experience another “crash” (similar to the one in the 1980s) any time
Vanyuwa [196]

Answer:

No they are not likely to crash

Explanation:

Video game are more advanced than the 1980s. There have been a great level of improvements in technology, such as virtual reality, more hardware capabilities and more capital investments.

6 0
2 years ago
Other questions:
  • Describe an ergonomic consideration for your body while working for long periods in front of a monitor or computer screen?
    14·1 answer
  • Write a statement that adds 1 to the variable reverseDrivers if the variable speed is less than 0,adds 1 to the variable parkedD
    14·1 answer
  • Design a hierarchy c hart or flowchart for a program that calculates the current balance in a savin gs account. The program must
    8·1 answer
  • What does the CPU do in a computer?
    7·2 answers
  • Write a program that lets the user enter a nonnegative integer then uses a loop to calculate the factorial of that number. Displ
    11·1 answer
  • Gina is upgrading your computer with a new processor. She installed the processor into your motherboard and adds the cooling sys
    9·2 answers
  • Write a script that checks to see if at least one argument has been given on the command line and tests whether the argument is
    5·1 answer
  • Which two statements are true about algorithms?
    15·2 answers
  • You want to send an email to members of your team working on a school project. In which field would you put the email addresses
    13·1 answer
  • How to transfer mysql database from one server to another
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!