How do you solve this? Problem 2: Throw Height Submit file: assign1p2.cpp Again, when you setup the
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Problem 2: Throw Height Submit file: assign1p2.cpp Again, when you setup the project for this problem, use assign1p2 for the Project Name. If you need to rename your code file, make sure to update your Makefile See here for how to successfully rename a.cpp file. The height h in meters an object will reach if it is thrown straight up depends on its initial velocity V in meters/second and the force of gravity g in meters/second.g varies depending on what planet/body you are on. On Earth, g is 9.8m/s; on Mars, 3.7m/s, on the Moon, it is 1.6m/s. Write a program that asks the user for an initial velocity and the force of gravity and uses this formula to calculate the height a thrown object will reach. h-V You do NOT have to worry about how many decimal places your answer prints to Sample run 1: (user input in red) Enter the velocity in m/s 28 Enter a value for 9 in 8/21 9.8 It will reach 20.4082 meters Sample run 2: (user input in red) Enter the velocity in m/s 12.5 Enter a value for g in m/s^2: 24.8 It will reach 3.1582 meters Hint: If you want to use the pow function to square V, you will need to put #include near the top of your file. Problem 2: Throw Height Submit file: assign1p2.cpp Again, when you setup the project for this problem, use assign1p2 for the Project Name. If you need to rename your code file, make sure to update your Makefile See here for how to successfully rename a.cpp file. The height h in meters an object will reach if it is thrown straight up depends on its initial velocity V in meters/second and the force of gravity g in meters/second.g varies depending on what planet/body you are on. On Earth, g is 9.8m/s; on Mars, 3.7m/s, on the Moon, it is 1.6m/s. Write a program that asks the user for an initial velocity and the force of gravity and uses this formula to calculate the height a thrown object will reach. h-V You do NOT have to worry about how many decimal places your answer prints to Sample run 1: (user input in red) Enter the velocity in m/s 28 Enter a value for 9 in 8/21 9.8 It will reach 20.4082 meters Sample run 2: (user input in red) Enter the velocity in m/s 12.5 Enter a value for g in m/s^2: 24.8 It will reach 3.1582 meters Hint: If you want to use the pow function to square V, you will need to put #include near the top of your file.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The Lean Philosophy attempts to reduce setup times, which will: A.) Increase Batch Sizes B.) Not Affect Batch Sizes C.) Increase Within-Batch Wait Time D.) Decrease Within-Batch Wait Time
-
Describe the three different tax rates discussed in the chapter and how taxpayers might use them.
-
Deer Lake Inc. uses a job order costing system with manufacturing overhead applied to products at a rate of 150% of direct labor cost. Find the missing amounts by treating each case independently....
-
The reciprocating mass, crank radius, and connecting-rod length of each of the cylinders in a two-cylinder in-line engine are given by \(m, r\), and \(l\), respectively. The crank angles of the two...
-
Andahl Logistics, a U. S. shipping company, has just begun distributing goods across the Atlantic to Norway. The company began operations in 2011, transporting goods to South America. The companys...
-
Moon (2007) noted four levels of reflective writing. Level 1 is descriptive but contains little reflection. Level 2 is descriptive with some reflection but lacks depth. Level 3 is descriptive,...
-
The following block diagram is used to generate an AM (DSB) signal. The modulating signal m(t) = cos 2n fmt is given. a) Express y(t) in terms of the modulating signal m(t) and the carrier c(t). b)...
-
Which of the following forms of income from employment would be exempt from income tax in tax year 2021-22? (a) Free meals in the company canteen. (b) Removal expenses of 4,500. (c) 1,000 given to an...
-
Malcolm's gross annual salary is 57,500. He is also entitled to an annual bonus which is based on his employer's profits for the previous calendar year. His bonus for the year to 31 December 2020 was...
-
Norma has prepared a set of accounts for the nine-month period to 31 December 2021. The written down value of her plant and machinery at 31 March 2021 was as follows: Plant and machinery transactions...
-
Anne's income for 2021-22 is as follows: Compute her income tax liability for the year. Bank interest: Interest on deposit account Interest credited to cash ISA Dividends received Retirement pension...
-
In 2021-22, Raj has dividend income of 63,670. He has no other income. He makes a qualifying Gift Aid donation of 440 during the year. Show his 2021-22 income tax computation.
-
Transformation processes are categorized into 4 types: Project, Batch, Line, or Continuous. Production strategies are classified into 3: Make to stock, make to order, and assemble to order, For each...
-
The Higher the time period of the financial security the higher the. ............... risk. O a. Maturity O b. Default and Maturity Oc. Default O d. Liquidity
-
How much of each of the following prizes or awards is taxable? a. Cheline received a $50,000 gift bag at the Oscars in 2012. b. Jon received a gold watch worth $350 for 25 years of service to his...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Yolanda is a cash basis taxpayer with the following transactions during the year: Cash received from sales of products........................................................................$65,000...
-
What do you really enjoy doing? What is your passion? Can your passion be a platform for a viable opportunity?
-
What do your friends and family envision you doing? What strengths and weaknesses do they observe? How do their insights help lead you to an opportunity that is right for you?
-
Put several of your ideas through the opportunity checklist in Figure 3.10. Which ideas seem to have the highest potential? Customer Identifiable Demographics Psychographics Trends Macromarket Target...
Study smarter with the SolutionInn App