Hello all,
Please I need your help again as I am stuck. I wrote a program to calculate the cumulative product of set of numbers. The program compiled but was not looping. Below is the code

Code:
/* program to calculate the cumulative products of a set of numbers*/
#include <stdio.h>
#include <math.h>
main()
{
   float num, product=1.0;
   int j, n;
   printf ("Enter the total items to calculate\n");
   scanf ("%f", &n);
   while (j<n)
      {
      printf ("\nEnter the number\n");
      scanf ("%f", num);
      product= product*num;
      ++j;
      };
   printf ("\nThe cumulative product is %f", product);
}
Please help me out.