Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- char a = 0;
- int i = 0;
- while (a != EOF ||i>200)
- {
- a = getc(stdin);
- if (a == ' ' || a == '\n')
- {
- printf("%c", a);
- continue;
- }
- else
- switch (a)
- {
- case 'X':
- {
- a = 'A';
- break;
- }
- case 'Y':
- {
- a = 'B';
- break;
- }
- case 'Z':
- a = 'C';
- break;
- default:
- a += 3;
- break;
- }
- printf("%c", a);
- ++i;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment