Pythagorean Theorem and C++ Program

Good Essays
Group 1
Write a C++ program or each of the following problems: 1. Write a C++ program to enter a distance in meters and print out its value in kilometers, yards, and miles. (Note: 1 m = 0.001 km = 1.094 yd = 0.0006215 mi). 2. Write a C++ program to enter length and width of a rectangle, compute and print the area and perimeter of the rectangle. Print both rounded to the nearest tenth of a foot. 3. Write a program to compute the cost for carpeting a room. Input should consist of the room length (in meters), room width (in meters), and carpet price per square meter. 4. Compute and print the number of minutes in a year. 5. Given a positive number, print its square and square root. 6. The arithmetic mean of two numbers is the result of dividing their some by 2. The geometric mean of two numbers is the square root of their product. The harmonic mean of two numbers is the arithmetic mean of their reciprocals. Write a program that takes two floating-point numbers as inputs and displays these three means. 7. Write a C++ program to take a depth (in kilometers) inside the earth as input data; compute and display the temperature at that depth in degrees Celsius and Fahrenheit. The relevant formulas are:

Celsius = 10 x (depth) + 20 (Celsius temperature at depth in km) Farhrenheit = 1.8 x (Celsius) + 32

8. The Pythagorean Theorem states that the sum of the squares of the sides of a right triangle is equal to the square of the hypotenuse. For example, if two sides of a right triangle have lengths 3 and 4, then the hypotenuse must have a length of 5. The integers 3, 4, and 5 together form a Pythagorean triple. There is an infinite number of such triples. Given two positive integers, m and n, where m > n, a Pythagorean triple can be generated by the following formulas:

Side1 = m2- n2 Side2 = 2mn Hypotenuse = side12 + side22

Group 2

1. In a laboratory, the time of an experiment is

You May Also Find These Documents Helpful

  • Better Essays

    Pythagorean Theorem

    • 2616 Words
    • 11 Pages

    PYTHAGOREAN THEOREM More than 4000 years ago, the Babyloneans and the Chinese already knew that a triangle with the sides of 3, 4 and 5 must be a right triangle. They used this knowledge to construct right angles. By dividing a string into twelve equal pieces and then laying it into a triangle so that one side is three, the second side four and the last side five sections long, they could easily construct a right angle. A Greek scholar named Pythagoras, who lived around 500 BC, was also fascinated…

    • 2616 Words
    • 11 Pages
    Better Essays
  • Good Essays

    Pythagorean Theorem

    • 769 Words
    • 4 Pages

    The assignment for the week is on page 371 number 98. We will be using Pythagorean Theorem, quadratic, zero factor, and compound equation, to solve this equation. We will explain step by step to solve how many paces to reach Castle Rock for Ahmed and Vanessa had to accomplish to meet there goal. Ahmed has half of a treasure map, which indicates that the treasure is buried in the desert 2x + 6 paces from Castle Rock. Vanessa has the other half of the map. Her half indicates that to find the treasure…

    • 769 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Pythagorean Theorem

    • 1149 Words
    • 5 Pages

    In mathematics, the Pythagorean theorem — or Pythagoras' theorem — is a relation in Euclidean geometry among the three sides of a right triangle (right-angled triangle). In terms of areas, it states: In any right-angled triangle, the area of the square whose side is the hypotenuse (the side opposite the right angle) is equal to the sum of the areas of the squares whose sides are the two legs (the two sides that meet at a right angle). The theorem can be written as an equation relating the lengths…

    • 1149 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Pythagorean Theorem

    • 620 Words
    • 3 Pages

    Pythagorean Theorem Diana Lorance MAT126 Dan Urbanski March 3, 2013 Pythagorean Theorem In this paper we are going to look at a problem that can be seen in the “Projects” section on page 620 of the Math in our World text. The problem discusses Pythagorean triples and asks if you can find more Pythagorean triples than the two that are listed which are (3,4, and 5) and (5,12, and 13) (Bluman, 2012). The Pythagorean theorem states that for any right triangle, the sum of the squares of the length…

    • 620 Words
    • 3 Pages
    Good Essays
  • Good Essays

    A Brief History of the Pythagorean Theorem Just Who Was This Pythagoras, Anyway? Pythagoras (569-500 B.C.E.) was born on the island of Samos in Greece, and did much traveling through Egypt, learning, among other things, mathematics. Not much more is known of his early years. Pythagoras gained his famous status by founding a group, the Brotherhood of Pythagoreans, which was devoted to the study of mathematics. The group was almost cult-like in that it had symbols, rituals and prayers. In addition…

    • 577 Words
    • 3 Pages
    Good Essays
  • Good Essays

    THE WIZARD OF OZ 2 The Wizard of Oz Scarecrow’s Speech on Pythagorean Theorem The Pythagorean theorem is one of the earliest theorems known to ancient civilization. The well-known theorem is named after the Greek mathematician and philosopher, Pythagoras. In the Wizard of Oz, after the Scarecrow gets a brain, he states the Pythagorean theorem. However, he mistakenly says it applies to an isosceles triangle when it applies to a right triangle. He not only says the wrong triangle…

    • 392 Words
    • 2 Pages
    Good Essays
  • Good Essays

    In mathematics, the Pythagorean Theorem — or Pythagoras' theorem — is a relation in Euclidean geometry among the three sides of a right triangle (right-angled triangle). In terms of areas, it states: In any right-angled triangle, the area of the square whose side is the hypotenuse (the side opposite the right angle) is equal to the sum of the areas of the squares whose sides are the two legs (the two sides that meet at a right angle). The theorem can be written as an equation relating the lengths…

    • 477 Words
    • 2 Pages
    Good Essays
  • Good Essays

    any triangle is 180º. Triangles can be classified according to the size of its angles. Some examples are : Acute Triangles An acute triangle is a triangle whose angles are all acute (i.e. less than 90°). In the acute triangle shown below, a, b and c are all acute angles. Sample Problem 1: A triangle has angles 46º, 63º and 71º. What type of triangle is this? Answer: Since all its angles are less than 90°, it is an acute triangle. Obtuse Triangles An obtuse triangle has one obtuse angle (i.e…

    • 2381 Words
    • 10 Pages
    Good Essays
  • Good Essays

    Pythagorean Theorem Essay

    • 489 Words
    • 2 Pages

    The Pythagorean theorem (A^2 + B^2 = C^2) has been impacting all types of people and careers since it was first realized during Ancient Greece times. It is one of the most widely recognized theorems in the mathematics community, and used much more than the average person knows: whether you need need to know the dimensions of a bag or you need find the distance from location to another, the Pythagorean theorem can be used. Everyone who was taught this theorem in their first year of algebra continues…

    • 489 Words
    • 2 Pages
    Good Essays
  • Good Essays

    mathematics that developed from simple measurements. A theorem is the most important result in all of elementary mathematics. It was the motivation for a wealth of advanced mathematics, such as Fermat's Last Theorem and the theory of Hilbert space. The Pythagorean Theorem asserts that for a right triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. There are many ways to prove the Pythagorean Theorem. A particularly simple one is the scaling relationship…

    • 539 Words
    • 3 Pages
    Good Essays