using namespace std;
int a, result, factorial(a); //declare 'a' as an int
//declare 'result 'as an int
//declare 'factorial' as in int, initialized to
//the value of 'a' which is ? junk...
cout << "please enter a number "; //ask user for input
cin >> a; //read in the input
cout << factorial(a); //display factorial(a) ??? I assume you believe
//that factorial is defined in cmath, which is
//not, and if you do then why were you declaring it as a variable?
for(a=1; a>0; a--) //start a loop from a = 1 until a <=0, which means
//this loop will only execute once
factorial *=a; //now take the variable functions thingy and
//multiply it by a, which is 1 , which means the
//variable function thingy has not changed
return 0; //return success, as if it were.