求一道C语言题目The aim of this exercise is to write a C program tha
求一道C语言题目
The aim of this exercise is to write a C program that reads two characters from keyboard and prints on the screen the shape shown below using those characters through function calls. For example if the characters are A and B, the program should display:
BBBABBB
BBA ABB
BA AB
A A
BA AB
BBA ABB
BBBABBB
Hints:
1. Write a function info that displays instructions to the user, read a character value from the keyboard and returns that value to the calling function.
2. Write a function shape that takes two parameters of the type char and prints on the screen the required shape using the characters provided as the actual parameters.
3. You may call the function info twice in the main function of your C program.
Note: DO NOT use a printf statement for each line or one long printf statement.
A sample run of the program is illustrated below:
Please enter a letter (A-Z): H
Please enter a letter (A-Z): P
Diamond shape of the letters:
PPPHPPP
PPH HPP
PH HP
H H
PH HP
PPH HPP
PPPHPPP
求大神能看懂并解答啦~~用C语言格式