intmain(){ int a,b; cin>>a>>b; int c=a+b; string d=to_string(c); int count=0; string temp=""; if (c<0){ cout<<"-"; for (int i = d.length()-1; i >=1; --i) { count++; temp=d[i]+temp; if (count%3==0&&i!=d.length()-1&&i!=1){ // cout<<','; temp=','+temp; } } } else{ for (int i = d.length()-1; i >=0; --i) { count++; temp=d[i]+temp; if (count%3==0&&i!=d.length()-1&&i!=0){ temp=','+temp; } } } cout<<temp;