Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- char map[30];
- int n;
- char mes[512];
- int main() {
- scanf("%d", &n);
- for (int i=0; i<n; i++) {
- scanf(" %[^\n] %s", mes,map);
- printf("%d ", i+1);
- for (int j=0; mes[j]!='\0'; j++)
- if (mes[j]==' ') printf(" ");
- else printf("%c", map[mes[j]-'A']);
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement