about | help | code help+videos | done | prefs |
Write a method that accepts a string called fruit, containing the name of a type of fruit; an integer called cost contains the number of whole dollars it costs for someone to buy that fruit from you. The variable numSold tells how many of those fruit were sold. Please look carefully at the sample data for examples. fruitStand("orange", 2, 11) → "You sold 11 oranges at $2 each, for a total of $22." fruitStand("date", 4, 50) → "You sold 50 dates at $4 each, for a total of $200." fruitStand("x", 30, 30) → "You sold 30 xs at $30 each, for a total of $900." ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 210
Copyright Nick Parlante 2017 - privacy