Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdio.h>
- #include <string.h>
- int main(void) {
- char a[80];
- int rotation, len, i;
- printf("Your string? ");
- gets(a);
- printf("Rotation? ");
- scanf("%d", &rotation);
- len = strlen(a);
- for (i = 0; i < len; i++) {
- if (a[i] >= 97 && a[i] <= 122) {
- a[i] += rotation;
- }
- }
- printf("Result: %s\n", a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement