I got 0 as output and I check the value of total inside if there it give 0 everytime
#include <iostream>
using namespace std;
int main()
{
    int n, total, a ;
    cout << "enter number for factorial :";
    cin >> n;
    a = n;
top:
    if (a != 0)
    {
        total *= a;
        a -= 1;
        
        goto top;
    }
    cout << "factorial of " << n << " is " <<total;
}
 
     
    