#include <stdio.h>   // for printf, scanf

int compute_product(int A, int B)
{
  int result = 1;
  int i;
  for (i = A; i <= B; i++)
  {
    result = result*i;
  }

  return result;
}


int main()
{
  int a, b;
  printf("please enter two integers A and B:\n");
  scanf("%d %d", &a, &b);

  if (a > b)
  {
    return 0;
  }

  int result = compute_product(a, b);
  printf("the product of all numbers between %d and %d is %d\n", a, b, result);
}

