Code:
name[i] += 1;
Code:
name[i] -= 1;
////////////////////////////////////////////////
Code:
name[i] *= 2;
Code:
name[i] /= 2;
Can someone "please explain?". Thanks.
name[i] += 1;
name[i] -= 1;
name[i] *= 2;
name[i] /= 2;
Simon F said:BTW "encryption" is a strong term for what you are doing
"encryption" is a strong term for what you are doing
unsigned char name[6] = {0};
int i=0;
cout << "Enter your name: ";
cin.getline(name,6);
OOPS! I got his order of operations back the front.Colourless said:The problem is you are overflowing on your multiplication.
char a;
....
a = a * 3
a = a * 171
K.I.L.E.R said:Simon F, I'm confused to what you are saying. I asked my programming teacher today and he didn't understand your post either. Could you please dumb it down a little for me? Thanks.
It's simple modulo arithmetic - my apologies if I don't remember the correct terminology for the following but more info can be found here
K.I.L.E.R said:Thanks.
I think I understand what you're saying. More now than I have before anyway.
Some of your terms are confusing me.
Modulo = modulus?
congruent = modulus?