![McDougal Littell Jurgensen Geometry: Student Edition Geometry](https://www.bartleby.com/isbn_cover_images/9780395977279/9780395977279_largeCoverImage.gif)
Concept explainers
To write the similar program for previous exercise in another language than BASIC.
![Check Mark](/static/check-mark.png)
Explanation of Solution
Given:
Break a stick into three pieces to get the probability that you can join the pieces end-to-end to form a triangle. If the sum of the length of any two pieces is less than or equal to that of the third, a triangle can’t be form. This is known as Triangle Inequality. By an experiment your class can estimate the probability that three pieces of broken stick will form a triangle.
Calculation:
Let D, N, I, X, Y, R, S and T variables used in program. Where D stands for number of sticks you have to break, N stands for first end of stick that is 0, I stands for variable of for loop assign from 1 to D, X and Y are stand for the length of points distance from initial point that is 0, R assigned as X, S assigned as Y − R and T assigned for 1 − R − S. Consider the program below-
The given program in C programming language is
Program:
#include <stdio.h> #include <math.h> #include <conio.h> int main(int argc, char *argv[]) { int D=0; int N=0; int I=1; float X=0, Y=0, R, S, T, P; printf("SIMULATION--BREAKING STICKS TO MAKE TRIANGL...*I); do { // get the random number between 0 and 1; line 70, 80 X = ((float)(rand()%100))/(float)100; Y = ((float)(rand()%100))/(float)100; } while (X>=Y); // if condition for X>=Y // for lines 100-150 R = X; S = Y-R; T = 1-R-S; if (R+S <= T) continue; if (S+T <= R) continue; if (R+T <= S) continue; N = N+1; } P = (float)N/(float)D; printf("\nTHE EXPERIMENTAL PROBABILITY THAT\nA BROKEN STICK CAN FORM A TRIANGLE IS %f\n",P); return 0; }
Sample Output:
SIMULATION--BREAKING STICKS TO MAKE
HOW MANY STICKS DO YOU WANT TO BREAK:100
THE EXPERIMENTAL PROBABILITY THAT
A BROKEN STICK CAN FORM A TRIANGLE IS 0.260000
Output Explanation:
SIMULATION--BREAKING STICKS TO MAKE TRIANGLES
Enter number of sticks as 10 which you want to break that is value of variable D
HOW MANY STICKS DO YOU WANT TO BREAK:100
THE EXPERIMENTAL PROBABILITY THAT
Then you get the experimental probability equal to 0.260000 that is P=0.260000
A BROKEN STICK CAN FORM A TRIANGLE IS 0.260000
Chapter 6 Solutions
McDougal Littell Jurgensen Geometry: Student Edition Geometry
Additional Math Textbook Solutions
Calculus: Early Transcendentals (2nd Edition)
Algebra and Trigonometry (6th Edition)
Pre-Algebra Student Edition
Elementary Statistics
University Calculus: Early Transcendentals (4th Edition)
Basic Business Statistics, Student Value Edition
- Question 2 Calculate the Moment about the point A in Nx m B 500 N A 2 m 300 N 10 E 1.2 m 0.5 m D 0.8 m 200 N Carrow_forwardQuestion 3 Calculate the Moment about the point B in Nxm A 300 N 2 m 500 N 4 B с 0.8 m 1.2 marrow_forwardQuestion 5 Calculate the Moment about the point B in Nx m B 500 N A 2 m 1.2 m 0.8 m 300 N 7arrow_forward
- Question 1 Calculate the Moment about the point A in Nx m A 300 N 2 m 500 N 4 B C 0.8 m 1.2 marrow_forwardWhat is the area of this figure? 22 mm 5 mm 3 mm 3 mm 7 mm 4 mm Write your answer using decimals. Use 3.14 for л. Submit square millimetersarrow_forwardThis figure is made up of a rectangle and parallelogram. What is the area of this figure? Enter your answer in the box. Do not round any side lengths.arrow_forward
- Rhombus PQRSPQRS is shown on the coordinate plane. Points MM and NN are midpoints of their respective sides.arrow_forwardPlease help me answer this question!. Please handwrite it. I don't require AI answers. Thanks for your time!.arrow_forward1 What is the area of triangle ABC? 12 60° 60° A D B A 6√√3 square units B 18√3 square units 36√3 square units D 72√3 square unitsarrow_forward
- Elementary Geometry For College Students, 7eGeometryISBN:9781337614085Author:Alexander, Daniel C.; Koeberlein, Geralyn M.Publisher:Cengage,Elementary Geometry for College StudentsGeometryISBN:9781285195698Author:Daniel C. Alexander, Geralyn M. KoeberleinPublisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337614085/9781337614085_smallCoverImage.jpg)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781285195698/9781285195698_smallCoverImage.gif)