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

 

tmhscs@gmail.com fundamentals > fund_product1toN
prev  |  next  |  chance

Given an integer, return the product of all numbers from 1 up to and including that number. For example, if the given number is 7, you should return 1*2*3*4*5*6*7.


fund_product1toN(1) → 1
fund_product1toN(2) → 2
fund_product1toN(3) → 6

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

public int fund_product1toN(int n) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy