C programming

ojyrofricial
IJir.pdf

CSE1001 HOME GETTING STARTED LABS ASSIGNMENTS HELP!

Assignments ​ > ​

Altitude

Assignment #1: altitude.c

Due Thursday, Feb 8, 2018 by 23:59:59

C source file name: altitude.c Submit server project id: altitude Submit Here

Verify Your Submission

File name must be altitude.c

Write a program that calculates the altitude of an airplane (in m, km, and ft) given the atmospheric pressure altitude and temperature T (in °C). The altitude (h) can be calculated (in m ) as follows:

where Po is the sea-level altitude and we assume that the sea-level altitude is 1013.25 hPa.

Search this site

Your program should ask the user for 3 different values for P ( atmospheric pressure) (temperature) in integer values. Next your program needs to calculate the altitude for the different atmospheric pressures and temperatures, and print the calculated altitude values in a table format as shown in example interaction section.

Use the following formula to convert m values to km

h(km) = h(m)/1000

and the following to convert to ft.

h(ft) = h(km) x 3280.8

This assignment will be graded according to the standards listed on the Assignments page. Submissions will be screened for plagiarism and other academically dishonest practices so you MUST do entirely your own work. You may help each other to understand and mathematically grasp the problems, but all submitted work must be unique and original.

Sample Interaction Enter the 1st pressure and temperature: 900.00 15 Enter the 2nd pressure and temperature: 725.85 25 Enter the 3rd pressure and temperature: 864.70 -20 pressure T m km ft 900.00 15 1010.83 1.01 3316.32 725.85 25 3004.89 3.00 9858.44 864.70 -20 1192.39 1.19 3911.99

Printf formatting instructions: Each column in the table has a width of 9 characters. Floating point numbers should be printed with a precision of 2. Do not use loops.

Do not use loops for this assignment.

Header: /* * Author: Firstname Lastname, email * Course: CSE 1001, Section 01/02, Spring 2018 * Project: project_id */

Comments

You do not have permission to add comments.