char s1,s2; string s; while(getline(cin,s)){ for(int i=0;i<6;i++){ s1=s[i]; s2=s[i+1]; if(s1>s2) cout<<s1-s2; else cout<<s2-s1; } }