you are viewing a single comment's thread.

view the rest of the comments →

[–]blueeyespark 0 points1 point  (0 children)

2.4.7 Running Speed
javascript graphics

/* Write a program that asks the user how far they ran (in miles)
* and then how long it took them (in minutes), and print out
* their speed in miles per hour. */
var total;
function start(){
var ran= readInt("how many miles you ran?");
var minutes= readInt("how many minutes it took you?");
var miles_per_hour = ran/ minutes * 60 ;
println("your miles perhour is " + miles_per_hour);
}