[SOLVED] COM1002 Lab 1

30.00 $

Category: Tags: ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab-1-tkgzp7.zip (44.4 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
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 input

40

184.25

0

9.625e5

Sample Output

80.00 m

1697.40 m

0.00 m

46320312320.00 m

  • Lab-1-tkgzp7.zip