Easy C# Solution
\npublic class Solution\n{\n    public int SubtractProductAndSum(int n)\n    {\n        int prod = 1;\n        int sum = 0;\n\n        while (n != 0)\n        {
```\npublic class Solution\n{\n    public int SubtractProductAndSum(int n)\n    {\n        int prod = 1;\n        int sum = 0;\n\n        while (n != 0)\n        {\n            int digit = n % 10;\n            prod *= digit;\n            sum += digit;\n            n = n / 10;\n        }\n\n        return prod - sum;\n    }\n}\n```
[]