Well I am writing a little message encryption program (simple) and Well it works but it will not change anything after a space. just hoping someone here could help.
cout << "Enter in the message you want to encrypt..." << endl << " ";
cin >> in;
count=strlen(in);
for(i = 0; i <= count; i++){
if(in[i]=='a'){
out[i]='z';
}if(in[i]=='b'){
out[i]='y';
}if(in[i]=='c'){
out[i]='x';
}if(in[i]=='d'){
out[i]='w';
}if(in[i]=='e'){
out[i]='v';
}if(in[i]=='f'){
out[i]='u';
}if(in[i]=='g'){
out[i]='t';
}if(in[i]=='h'){
out[i]='s';
}if(in[i]=='i'){
out[i]='r';
}if(in[i]=='j'){
out[i]='q';
}if(in[i]=='k'){
out[i]='p';
}if(in[i]=='l'){
out[i]='o';
}if(in[i]=='m'){
out[i]='n';
}if(in[i]=='n'){
out[i]='m';
}if(in[i]=='o'){
out[i]='l';
}if(in[i]=='p'){
out[i]='k';
}if(in[i]=='q'){
out[i]='j';
}if(in[i]=='r'){
out[i]='i';
}if(in[i]=='s'){
out[i]='h';
}if(in[i]=='t'){
out[i]='g';
}if(in[i]=='u'){
out[i]='f';
}if(in[i]=='v'){
out[i]='e';
}if(in[i]=='w'){
out[i]='d';
}if(in[i]=='x'){
out[i]='c';
}if(in[i]=='y'){
out[i]='b';
}if(in[i]=='z'){
out[i]='a';
}
}
cout << "The encoded message is..." << endl << out << endl;
cin.get();
pause();
goto start;