id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > turkeyRun
prev  |  next  |  chance

Write a method that has two integer parameters, mph and hours. The parameter mph tells how many miles per hour you were going and hours tells for how long you were going at that speed. Return how many miles you went in the indicated amount of time. Note that if either mph or hours are negative you should return zero as the result.


turkeyRun(-142, 4) → 0
turkeyRun(3, 11) → 33
turkeyRun(1, 8) → 8

...Save, Compile, Run (ctrl-enter)

public int turkeyRun(int mph, int hours) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 240

Copyright Nick Parlante 2017 - privacy