Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ME 4 0 0 - Computer Applications in Mechanical Engineering Exercise # 1 Instructions: Complete each of the following steps. When you have completed all
ME Computer Applications in Mechanical Engineering
Exercise #
Instructions:
Complete each of the following steps. When you have completed all steps
assigned, upload the files associated with the exercise on Canvas. Make sure
the filenames you upload as part of your exercise submission have the exact
names specified in each steps of this exercise. If the filenames do not match
exactly, then you submission will not be graded.
Problem
Consider a ball of mass m that is thrown upward at time with an initial velocity
Assume that the velocity and height can be calculated using the following equations:
where is the accelerations of gravity. Write a program, which meets the
requirements listed below, to calculate the velocity and the height at time
Requirements
Create a sub directory named exa and an associated C source file named
exacpp in your CPP directory on the Z: drive.
Declare a variable as an integer, and variables and as floats.
Assign a value of to the variable
Prompt the user to enter the initial velocity in meterssecond Capture the user
input using the stream object and store the resulting value in the variable
Prompt the user to enter the time that has passed in seconds. Capture the user
input using the cin stream object and store the resulting value in the variable
Calculate the velocity after seconds and store the value in the variable
Calculate the height after seconds and store the value in the variable
Using the cout stream object output the values of vt and ht in the following
format:
The velocity after time ### seconds is #### meterss
The height after time ### seconds is #### meters
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started