Calculate Average and Product

Take integer inputs from user until he/she presses q ( Ask to press q to quit after every integer input ).
Print average and product of all numbers.


Initialise three variables nCount, nTotal and nProduct with 0, 0 and 1 respectively

Create a while loop to repeat till user enters “q”

Get an integer number from the user

Add 1 to nCount

Add the number to nTotal

Multiply the number into nProduct

Outside the loop print the Average and products of the number given by the user.