Concept explainers
The Speed of Sound in Gases
When sound travels through a gas, its speed depends primarily on the density of the medium. The less dense the medium, the faster the speed will be. The following table shows the approximate speed of sound at 0 degrees centigrade, measured in meters per second, when traveling through carbon dioxide, air, helium, and hydrogen.
Medium | Speed (Meters per Second) |
Carbon dioxide | 258.0 |
Air | 331.5 |
Helium | 972.0 |
Hydrogen | 1,270.0 |
Write a
Input Validation: Check that the user has selected one of the available menu choices. Do not accept times less than 0 seconds or more than 30 seconds.
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Starting Out with C++ from Control Structures to Objects (9th Edition)
Additional Engineering Textbook Solutions
Mechanics of Materials (10th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Introduction To Programming Using Visual Basic (11th Edition)
Starting Out with Python (4th Edition)
Degarmo's Materials And Processes In Manufacturing
- One way to determine how healthy a person is by measuring the body fat of the person. The formulas to determine the body fat for female and male are as follows: Body fat formula for women: A1 = (body weight x 0.732) + 8.987 A2 = wrist measurement (at fullest point)/3.140 A3 = waist measurement (at navel) x 0.157 A4 = hip measurement (at fullest point) x 0.249 A6 = forearm measurement (at fullest point) x 0.434 B = A1 + A2 A3 A4 + A5 Body fat = body weight - B Body fat percentage = body fat x 100/body weight Body fat formula for men: A1 = (Body weight x 1.082) + 94.42 A2 = wrist measurement x 4.15 B = A1 A2 Body fat = body weight B Body fat percentage = body fat x 100/body weight Write a program to calculate the body fat of a person.arrow_forwardThe Harris-Benedict equation estimates the number of calories your body needs to maintainyour weight if you do no exercise. This is called your basal metabolic rate, or BMR.The formula for the calories needed for a woman to maintain her weight isBMR = 655 + (4.3 x weight in pounds) + (4.7 x height in inches) -(4.7 x age in years)The formula for the calories needed for a man to maintain his weight isBMR = 66 + (6.3 x weight in pounds) + (12.9 x height in inches) -(6.8 x age in years)A typical chocolate bar will contain around 230 calories. Write a program that allows the userto input his or her weight in pounds, height in inches, age in years, and the character M formale and F for female. The program should then output the number of chocolate bars thatshould be consumed to maintain one's weight for the appropriate sex of the specified weight,height, and age.arrow_forwardThe (x, y) coordinates of the hand at the top of a robot arm are given by: x = L, cos(8,) + L, cos(8, + 0,) y = L, sin(0,) + L,sin(8, + 02) Where Li and L2 are the distances of the parts of the arm from the shoulder to the elbow and from the elbow to the hand, 01 and 02 are the angles that these parts make with the x-axis. These angles can be expressed as: 0,(t) = a,t5 + a,t“ + azt³ 02(t) = bịt5 + b;t + b3t³ where t is the time. We assume that the arm starts to move at t= 0s and stops at tf=2s. The conditions that the angular position G1(t), angular velocity and angular acceleration should meet at the final time tf = 2 (in sec) are expressed in the following matrix form and allow us to obtain the coefficients a1, az and a3: 25 24 23 3x22||a2 = [az. [01f – 010] 5x24 4x23 | 20x23 12x22 6x2 with 0lf=43x/180, 610 = -197/180. a) Use MATLAB left division to solve the above system and get the coefficients a1, az and as b) Similarly the coefficients b1, bɔ and b3 can be obtained by solving a…arrow_forward
- The unit of convection current density is * O Ampere per Meter O Ampere O Volt per Meter O Ampere per Square Meterarrow_forwardThe total nuclear binding energy is the energy required to split a nucleus of an atom in its component parts: protons and neutrons, or, collectively, the nucleons. It describes how strongly nucleons are bound to each other. When a high amount of energy is needed to separate the nucleons, it means nucleus is very stable and the neutrons and protons are tightly bound to each other. The atomic number or proton number (symbol Z) is the number of protons found in the nucleus of an atom. The sum of the atomic number Z and the number of neutrons N gives the mass number A of an atom. Figure 1: Binding Energy in the Nucleus The approximate nuclear binding energy Eb in million electron volts, of an atomic nucleus with atomic number Z and mass number A is calculated using the following formula: See pictures The binding energy per nucleon (BEN) is calculated by dividing the binding energy (Eb) by the mass number (A). You are asked to write a program that requests the user for a valid atomic…arrow_forwardThe mitotic index is a calculated value that represents the percentage of cells in a sample that are actively dividing. It involves counting the total number of cells present including those actively dividing or those in interphase, the total number of cells that are actively dividing (not including interphase), and then calculating what percentage of the total cells are actively dividing (the percentage undergoing mitosis). The formula is: Mitotic index= # of cells in mitosis / # of cells in total x 100% Use this formula to calculate the mitotic index for the diagram seen in Question 5. Show your calculations (you can use * for multiplication and / for division if you prefer) and indicate your final answer as a percentage rounded to the nearest tenth of a percentage (1 decimal place). Note: The mitotic index seen in this simulation is much higher than you would see in a real tissue sample. The sample was simulated this way so that the counting and calculations would be easier…arrow_forward
- A multiple-choice quiz consists of 5 questions with 4 possible choices. In how many ways can a student answer the questions if the student answers every question (i.e. they don't leave any question blank). Group of answer choices. 1024,512,2048,256arrow_forwardالفصل: الثاني الموضوع : واجب منزلي Assignment Question: (i): Given three numbers (numl, num2, and num3), write an algorithm to find and print the sumarrow_forwardInterest Rates Savings accounts state an interest rate and a compounding period. If theamount deposited is P, the stated interest rate is r, and interest is compounded m timesper year, then the balance in the account after one year is P⋅(1+rm)m. For instance, if$1000 is deposited at 3% interest compounded quarterly (that is, 4 times per year), thenthe balance after one year is1000⋅(1+.034)4=1000⋅1.00754=$1,030.34.Interest rates with different compounding periods cannot be compared directly.The concept of APY (annual percentage yield) must be used to make the comparison. TheAPY for a stated interest rate r compounded m times per year is defined byAPY=(1+rm)m−1.(The APY is the simple interest rate that yields the same amount of interest after oneyear as the compounded annual rate of interest.) Write a program to compare interestrates offered by two different banks and determine the most favorable interest rate. SeeFig. 4.24.arrow_forward
- In Saudi Arabia, the Kudai Parking Area is a parking lot that is next to the Ajyad Police Station and close to the Power Plant. Kudai is a well-known parking space near Masjid al-Haram. After parking there, you can take a taxi to Masjid al-Haram for 10-15 Riyals for a 10-minute drive. The parking is usually heavily occupied, and the following formula is used to compute the parking lot uțilization: Percentage of Parking Lot Utilized - Number of lots occupied + Total number of lots Write a program that calculates the occupancy rate for each zone of a massive parking lot like Kudai. The program should start by asking for the number of zones in the parking lot. A loop should then iterate once for each zone. During each iteration, the loop should ask the user for the number of lots in the zone and the number of them that are occupied. After all the iterations, the program should display the number of lots the parking has, the number of them that are occupied, the number that is vacant, and…arrow_forwardQuestion-1 Friend's Party Circle: There are a few friends living in the same area. They have a party every weekend and the place of party change each week. It is always a difficult task to select a place which is nearest for everyone. They all decided advantage of Computer Science to solve this problem. to take Names of friends are Ahmed, Rehman, Careem, Basit, Dawood, Ghani, and Farid. Ahmed lives at 5 minutes’walk from rehman and at 10 minutes' walk from Careem. Careem lives at 3 minutes' walk from Dawood. Rehman lives at 4 minutes' walk from Basit and 2 minutes' walk from Dawood. Dawood lives at two minutes' walk from Farid. Ghani lives at 2 minutes' walk from Basit. b. In above directed graph G. You are required to devise an algorithm to find all possible paths.arrow_forwardGolf scores record the number of strokes used to get the ball in the hole. The expected number of strokes varies from hole to hole and is called par (possible values: 3, 4, or 5). Each score's name is based on the actual strokes taken compared to par: "Eagle": number of strokes is two less than par "Birdie": number of strokes is one less than par "Par": number of strokes equals par "Bogey": number of strokes is one more than par Given two integers that represent the number of strokes used and par, write a program that prints the appropriate score name. Print "Error" at the end of the output if par or score is not in the expected range. Ex: If the input is: 3 4 the output is: Par 4 in 3 strokes is Birdiearrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEnhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage Learning
- Principles of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT