Spring 2017

Lab02
Lightspeed

Due: Monday February 06, 2017 11:59 PM

Lab02 - Lightspeed

Requirements

Program compiles without errors20 pts
Program code is clean and readable10 pts
Program prompts the user for input10 pts
Program finds the correct answer when days are less than 10030 pts
Program finds the correct answer when days are between 100 and 10,00020 pts
Program does not use larger than needed datatypes10 pts
Total100 pts

Resources

Objective

To practice with variables, datatypes, and arithmetic

Instructions

The speed of light in a vacuum is 186,000 miles per second. Create a C program that will prompt the user of the program to enter a number of days. Perform the arithmetic that is necessary to calculate how many miles light will travel in that number of days.

Make your program readable with good use of whitespace, good variable names, and comments where needed.