Easy and Simple Solution Using Array
\npublic class Solution {\n    public int SubtractProductAndSum(int n) {\n        string s = n.ToString();\n        char[] c = s.ToCharArray();\n        int pro
```\npublic class Solution {\n    public int SubtractProductAndSum(int n) {\n        string s = n.ToString();\n        char[] c = s.ToCharArray();\n        int prod = 1;\n        int sum = 0;\n        for(int i = 0; i < c.Length; i++)\n        {\n            int y = Convert.ToInt32(c[i].ToString());\n            prod *= y;\n            sum += y;\n        } \n        return prod-sum; \n    }\n}\n```
['Array']