C++ || Simple
class Solution {\npublic:\n    string fractionAddition(string exp) {\n        int nu=0, du=1;\n        int i=0, n=exp.size();\n        int sign=1;\n        whil
class Solution {\npublic:\n    string fractionAddition(string exp) {\n        int nu=0, du=1;\n        int i=0, n=exp.size();\n        int sign=1;\n        while(i<n)\n        {\n            int x=0,y=0;\n            if(exp[i]==\'+\') sign=1, i=i+1;\n            else if(exp[i]==\'-\') sign= -1, i=i+1;\n            while( i<n and exp[i]>=\'0\' and exp[i]<=\'9\' )x= 10*x+exp[i++]-\'0\';\n            \n            i++;\n             while(i<n and exp[i]>=\'0\' and exp[i]<=\'9\' )\n                y=y*10 + exp[i++]-\'0\';\n         \n            x*=sign;\n            \n            nu= nu*y+du*x;\n            du*=y;\n            \n        \n            if(!nu)\n            {\n                du=1;\n            }\n            else\n            {\n                int gcd= __gcd(abs(nu),du);\n                nu/=gcd;\n                du/=gcd;\n            }\n      \n                \n        }\n         return to_string(nu)+"/"+to_string(du);\n    }\n};
['C']