I am wondering if there would be any chance that someone could help me out with this, I am trying to teach myself c++ which i find it really interesting and I came accross this and would love to see how it works so i could do it and learn by it.
- You need to implement code to output the following line to the screen:
–- Task 1 –- - You will need to use a for loop to multiply a sequence of integers entered by the user.
2.1. Assume that the first integer read specifies the number of values remaining to be entered.
2.2. You program should read only one value per input (cin) statement.
2.3. Your program will then output both the product and the average of the numbers entered.
A typical input sequence might be:
−−− Task 1 −−−
Enter a l i s t o f numbers .
The f i r s t number w i l l r e p r e s e n t the t o t a l number o f r e p e t i t i o n s : 5 2 2 2 2 2
The p r oduc t o f the numbers e n t e r e d i s : 32
The a v e r a g e o f the numbers e n t e r e d i s : 2. 0
Another example may l o o k l i k e :
−−− Task 1 −−−
Enter a l i s t o f numbers .
The f i r s t number w i l l r e p r e s e n t the t o t a l number o f r e p e t i t i o n s : 3 1 2 3
The p r oduc t o f the numbers e n t e r e d i s : 6
The a v e r a g e o f the numbers e n t e r e d i s : 2. 0