Hey.
My program inputs a number (n) and then outputs the result of all of the numbers up to and including n multiplied together.
E.g.
n = 7
result = 1 * 2 * 3 * 4 * 5 * 6 * 7
I know that I need to use a loop to get all the numbers but then how do I multiply them all together?
Thanks
My program inputs a number (n) and then outputs the result of all of the numbers up to and including n multiplied together.
E.g.
n = 7
result = 1 * 2 * 3 * 4 * 5 * 6 * 7
I know that I need to use a loop to get all the numbers but then how do I multiply them all together?
Thanks
Comment