Lab 2 - Lab Two [30 points + 5 extra credit] This lab has 2...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 209 - Page 1 of 5 Lab Two [30 points + 5 extra credit] This lab has 2 parts, and you must turn in one zip file to KS Online for each part (a total of 2 files). Try to work through the lab on your own, but if you get stuck, ask a neighbor or the instructor for help. Part A: Debugging Errors [10 points] Create a new project and copy-and-paste the following program: Find and fix the errors so that it produces the correct output shown below. #include <stdio.h> int main() { double mph fps; printf( "Enter a velocity in miles per hour: " ); scanf( "%f" , mph ); fps = mph * 5280 * 60 * 60: printf( "%f mph is %e feet per second\n" mph fps ); return 0; Enter a velocity in miles per hour: 70.0 70.00 mph is 1.03e+002 feet per second
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CIS 209 - Page 2 of 5 Part B: Equations into Programs [20 points] A common programming task in engineering is to write a program that solves an equa- tion. Consider an example from aviation in which we want to calculate the headwind and crosswind forces on an airplane. It is especially important when you’re trying to land.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/29/2011 for the course CIS 209 taught by Professor Aren during the Spring '11 term at Kansas State University.

Page1 / 5

Lab 2 - Lab Two [30 points + 5 extra credit] This lab has 2...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online