Menu
Coddy logo textTech

Encryption

Lesson 13 of 25 in Coddy's Coding Problems: Volume 2 course.

Your friend wants to communicate with you through encrypted messages. To encrypt the message, you need to know the rules on how to do it. When you want to send a message, you reverse it and on the even indexes, you put a character X that will be specified. 
Note: The first index is 0

challenge icon

Challenge

Medium

Write a program that reads a character X followed by a message from standard input and outputs the wanted encryption

Input
#
075385

Output
#8#5#0

Try it yourself

#include <stdio.h>

int main() {
    // Write code here
    return 0;
}

All lessons in Coding Problems: Volume 2