SHARE
TWEET

Untitled

a guest Nov 12th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top