Basically I'm only just getting started and trying to get to grips with:
(funct. 1 here);
while(funct. 2 here);
(funct. 3 here);
and doing this by writing a script that will take two numbers, b > a, and work out what a*(a+1)*(a+2)*...*(b) is. In other words (b factorial)/(a factorial)
Right now I'm learning by taking notes from a guy explaining it to me (I'm going to get a decent book soon) and they're pretty confused. I think the code should look like
int VAR(int a, int b);
int a = 3;
int b = 6;
int h;
h=a;
h=h*(++a);
while(a!=h){
a=a+1;
h=h*a;
return h;
}
But the software I'm using to test it (Ch student) is shutting down whenever I do this. Could someone correct it for me? Once I know how it should look it'll be easier to work out how it does work.