This site requires JavaScript, please enable it in your browser!
Greenfoot back
Heidkamp
Heidkamp wrote ...

2024/4/21

caesars chiffe

Heidkamp Heidkamp

2024/4/21

#
hello, how can I find the proper syntax for adding the ascii value of a character an integer (lets call it offset) and then convert this new integer into the respective string (ascii code)? in principle, char of (value of char+offset) - this is how I would describe it
danpost danpost

2024/4/22

#
Heidkamp wrote...
how can I find the proper syntax for adding the ascii value of a character an integer (lets call it offset) and then convert this new integer into the respective string (ascii code)? in principle, char of (value of char+offset) - this is how I would describe it
// pre-assigned variables
int offset;
char oldChar;
    // then
char newChar = oldChar+offset;
You need to login to post a reply.