Answer the following questions for the problems listed below
Answer the following questions for the problems listed below. Type your answers in a text file. 1.What are the inputs? .What format are they in? (e.g., integer, floating-point, character, or string) Any valid or invalid values? (e.g. positive, negative, valid range certain values) .How do you get them? (e.g., prompt user or read from file) 2.How do you get from inputs to the outputs you want (process)? .What are the calculation steps? .To follow these steps, what else do you need? .Other variables, constants, conversion? (besides input and output variables) .Libraries (e.g., for calculations). 3.What are the outputs? .What format are they in? .How do you output them? (e.g., on screen or to a file)
Solution
1)Inputs:
format: floating-type
Valid range : ( 0, + infinity )
Source : Except for weight of pumpkin remaining everything we can get from file.Weight of pumpkin should be prompted by user
2)Steps:
constants : g =gravity = 9.807
variables :vf (for velocity) ; h (for calculated maximum height)
Libraries: math.h library ( for using pow function in order to find the power
3) Outputs are the maximum height calculated
format : floating-point
we output them on screen
