Strings-Difference in Ascii Codes garabage value debug

https://ide.codingblocks.com/s/52004 how to resolve garabage value in this code give me some hint

@sanjeetboora please help me what i am doing wrong please tell me

Hey Neeraj, you can avoid printing the ascii difference for last character just by putting an if check. Here i have corrected your code you can refer this

for(int i=0;i<s.length();i++){
		int d=s[i+1]-s[i];
        if(i!=s.length()-1)
		cout<<s[i]+to_string(d);
        else{
            cout<<s[i];
        }
	}