C solution
beginner problem\nC\nint subtractProductAndSum(int n){\n    int sum = 0, product = 1, x;\n    while(n>0){\n        x = n%10;\n        sum += x;\n        product
beginner problem\n```C\nint subtractProductAndSum(int n){\n    int sum = 0, product = 1, x;\n    while(n>0){\n        x = n%10;\n        sum += x;\n        product *= x;\n        n /= 10;\n    }\n    return product - sum;\n}\n```
[]