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
AlekseyPX
3 years ago
8

In C++ please.

Computers and Technology
1 answer:
natali 33 [55]3 years ago
7 0

Answer:

Following are the code to this question:

#include <iostream>//defining header file  

using namespace std;    

bool rightTriangle(int s1,int s2,int s3) //defining method rightTriangle  

{

int t1,t2,t3; //defining integer variables

t1 = s1*s1; // multiplying side value and store it into declaring integer  variables

t2 = s2*s2; // multiplying side value and store it into declaring integer variables

t3 = s3*s3;  // multiplying side value and store it into declaring integer variables

if(t3 == t1+t2)//use if block to check Pythagoras theorem

{

return true; //return true

}

else //else block

{

return false; //return false

}

}

bool equalNums(int n1,int n2,int n3,int n4) //defining method equalNums  

{

if(n1==n3 && n2==n4) //defining if block that checks  

{

return true;//return value true  

}

else //else block  

{

return false; //return value false

}

}

int main()//defining main method

{  

int t1=3,t2=4,t3=5,t11=3,t12=4,t13=5; //declaring integer varibles and assign value  

int check=0;   //defining integer varible check that checks values

if(rightTriangle(t1,t2,t3)&&rightTriangle(t11,t12,t13)) //defining codition to check value using and gate

{

if(equalNums(t1,t3,t11,t13) || equalNums(t2,t3,t12,t13)) // defining conditions to check value using or gate

check = 1; //if both conditions are true

}

if(check==1) //if block to check value is equal to 1

{

cout << "Right Congruent Triangles"; //print message

}

else//else block

{

   cout << "Not Right Congruent Triangles";//print message

}

}

Output:

Right Congruent Triangles

Explanation:

  • In the above-given code, a boolean method "rightTriangle" is declared, in which it accepts three integer variable "s1, s2, and s3" as a parameter, inside the method three another variable "t1, t2, and t3" is declared, in which parameter stores its square value.
  • In the next line, a conditional statement is declared that checks the "Pythagoras theorem" value and returns its value.  
  • In the next step, another method "equalNums" is declared, that accepts four integer parameter "n1, n2, n3, and n4", inside the method a conditional statement is used that uses an operator to check n1, n3, and n2, n4 value if it is true it will return true value else it will return false.
  • Inside the main method, integer variable and a check variable is defined that uses the if block to passes the value into the method and checks its return value is equal if all the value is true it will print the message "Right Congruent Triangles" else "Not Right Congruent Triangles".
You might be interested in
Business intelligence is gained through industrial espionage and the gathering of this information often includes illegal or une
Nataly [62]

Answer:

A) True

Explanation:

Industrial espionage utilizes both illegal and unethical methods in gathering information about a corporate organization in order to get business intelligence. This involves stealing intellectual property and trade secrets to use them for a competitive advantage.  because Information about company's products, services, finances, sales, etc can be toold for  economic warfare

3 0
3 years ago
Executives of a company deal less with details of the operational activities and deal more with the higher meaningful aggregatio
mylen [45]

Answer:

3. Granularity

Explanation:

Granularity's concept is representing the level of how do we store the data in our database.

If the data are detailed, we can resume the data until get a granularity more strong for our analysis.

For example:

We could store data year by year of our costumers, if want to get more granularity, we could store data month by month, also we could get specific data like how often our customers visit the business or how often our customers buy in a category product.

4 0
3 years ago
Who developed one of the first mathematical models of a multilevel security computer system?
svp [43]

Answer:

C. Bell and LaPadula

Explanation:

The first mathematical models of multilevel security computer system was developed by Bell and Lapadula. Their full names are David Elliot Bell and Leonard J. Lapadula. Their model used to define the concept of modes of access,secure state machine and outlined the rules of access.

6 0
3 years ago
When doing a complex presentation, which of the following would be the best tool to begin designing your presentation?
Tomtit [17]

Answer:

B.) Open Office Impress

Explanation:

The options are:

A.) Open Office Writer

B.) Open Office Impress

C.) an outline

D.) photographs

Out of the above, the Impress is used for doing complex presentation, and its one of the best tool for it like PowerPoint. Its quite the same as PowerPoint, and it supports both ppt format as well as odp or the open document presentation format. You can make very complex presentations with the help of the Open office Impress.

7 0
3 years ago
Read 2 more answers
How do multi-cellular organisms develop?
FromTheMoon [43]
Letter B. is the answer
<span>B.  Cell differentiation - start from a single cell and as the cells divide they become specialized</span>

HOPE THIS HELPS















4 0
3 years ago
Other questions:
  • In Microsoft Word, how would you change the amount of space that is put in after each paragraph?
    15·1 answer
  • What are rules that enforce basic and fundamental information-based constraints?
    12·1 answer
  • Which feature is used to summarize data from multiple worksheets but does not require that the data be in the same location on e
    12·1 answer
  • You are the leader of a team at work. What type of leader would you like to be – one that gets involved and works with the team
    15·2 answers
  • How do you know where the home row of the keyboard is?
    14·2 answers
  • You are splitting up all your apples equally between 3 people. which statement below will calculate how many apples will be left
    12·1 answer
  • What keyword must be used on any method (function) on your class that is called from your main() method?
    15·1 answer
  • Mô tả những lợi ích của việc sử dụng đa xử lý không đồng nhất trong một hệ thống di động
    8·1 answer
  • a bus is full of passengers. if you count them by either twos, threes, or fives, there is one left. if you count them by seven t
    10·1 answer
  • Are all the computer users known as programmer ​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!