Computer Science, asked by tarunxshoters, 10 months ago

Given a string S of odd length L, the program must print it twice as diagonals with the middle letter being the
point of intersection.
Input Format:
The first line contains the value of S.

Boundary Conditions:
The length of the String S is from 3 to 20.
1 <= L (Length of 5) <= 20

Output Format:
L lines printing the desired pattern.
Example Input/Output 1:
Input:
PROGRAM
Output:
P M
R A
OR
G
OR
R A
P M​

Answers

Answered by ıtʑFᴇᴇʟɓᴇãᴛ
0

tex

html

head

The first line contains the value of S.

Boundary Conditions:

The length of the String S is from 3 to 20.

1 <= L (Length of 5) <= 20

Output Format:

L lines printing the desired pattern.

Example Input/Output 1:

Input:

PROGRAM

Output:

P M

R A

OR

G

OR

R A

P M

Similar questions