CSC 270 - Survey of Programming Languages

Assignment #16 - Calculating distance traveled

Due Friday, November 17, 2017

If you travel at 55 miles per hour for 8 hours, you should discover that you have traveled 440 miles. Obviously, if you travel for less time, or if you increase your speed this will affect the number of miles that you have traveled.

Write a program in Scheme to calculate the number of miles traveled, given the speed (in miles per hour) and the time traveled (in hours). The formula is:

Distance (in miles) = Speed (in miles per hour) * Time Traveled (in hours).

Run the program using Dr. Racket for:

SpeedTime Traveled
55 2
554
556
558
602
604
606
608
652
654
656
658

[Back to the Assignments Index]