You are on page 1of 1

9/3/21, 4:05 PM Variable Arguments|Techgig

Variable Arguments (100 Marks)


You have to handle the variable number of arguments passed to a function mul().
The function should handle below cases of arguments:
mul(int, int)
mul(int, int, int)
mul(int, int, int, int)
mul(int, int, int, int, int)

Input Format
There will be 5 lines of input with each having an integer.

Constraints
1<= N <=10

Output Format
The first line of output should print product of first two numbers.
The second line of output should print product of first three numbers.
The third line of output should print product of first four numbers.
The fourth line of output should print product of first five numbers.
The fifth line would be empty with a new line previous println.

Sample TestCase 1

Input

1
2
3
4
5

Output

2
6
24
120

https://www.techgig.com/practice/question/variable-arguments/RDhQako5dzFXMWEvd2RxOTJ6ZUp0bWFvYkExS2JoUnF6MHAvWHN2OTVzQkVvS… 1/1

You might also like