I need to write a program which will execute a factorial, but with an upper and lower bound. Here's what I've written, but it's not working. I keep getting an error message on the for command with expression syntax. Please, I've got to have this and much much more by wednesday.
Thanks!
#include <iostream.h>
#define q = 3
int main()
{
int n;
if (n < 0) return 0;
int f;
for (n=1; n <= q; n++)
{
double f = 1;
{f *= n;}
}
cout<< f;
char w;
cin>>w;
return 0;
}