[SOLVED] COM1002 Lab 1

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product

An object is released from a pla3orm to free fall. Assume that the velocity at the 7me of hi8ng to the ground is provided to the program as an input, write a C program which computes and prints the height of the pla3orm that the object is released from.  The computed height should be printed with 2 digit precision a@er the decimal point (See the hint given below).

Related physics formulas:

height=(1/2)gt2 velocity=gt g = 10 m/s2

I/O Format:

Input/Output source: Standard input/output

Input format: <velocity>

Output format:<height> m\n

Hint: %.2f format specifier prints 2 digit precision for floa7ng point numbers

Please, PAY ATTENTION TO THE  I/O FORMAT!

    Sample Output
  Sample input
40   80.00 m
184.25   1697.40 m
0   0.00 m
9.625e5   46320312320.00 m

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.