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:
Run the program using Dr. Racket for:
Speed | Time Traveled |
---|---|
55 | 2 |
55 | 4 |
55 | 6 |
55 | 8 |
60 | 2 |
60 | 4 |
60 | 6 |
60 | 8 |
65 | 2 |
65 | 4 |
65 | 6 |
65 | 8 |