Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. /* Write a program that asks the user how far they ran (in miles)
  2. * and then how long it took them (in minutes), and print out
  3. * their speed in miles per hour. */
  4. function start(){
  5.  
  6. var num = readInt("How long did you run in miles? ");
  7. var numtwo = readInt("How long would that be for in minutes? ");
  8.  
  9. numtwo = numtwo / 14;
  10.  
  11. var timeboi = (numtwo * num);
  12.  
  13.  
  14. print(timeboi + " is your speed");
  15.  
  16. timeboi = (timeboi * 60);
  17.  
  18. print(timeboi);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement