使用VC+2010打开考生文件夹下blank1中的解决方案。此解决方案的项目中包含一个源程序文件blank1.c。下列给定程序中,函数un的功能是:根据形参c中指定的大写英文字母,按顺序打印出3个相邻的字母,指定的字母位于中间。若指定的字母为Z,则打印YZA;若指定的字母为A,则打印ZAB。
请在程序的下划线处填入正确的内容并把下划线册删除,使程序得出正确的结果
注意:源程序存放在文件BLANK1.C中,不得增行或删行,也不得更改程序的结构!
#include <stdio.h>
#include <ctype.h>
#pragma warning (disable:4996)
void fun(char ch)
{ char t[3];
int i;
t[1]=ch;
/**********************found***********************/
if (ch=='Z'){ t[2]='A'; t[0]= ____(1)____ ; }
/**********************found***********************/
else if (ch=='A') {t[2]='B'; t[0]= ____(2)____; }
/**********************found***********************/
else { t[0]=ch-1; t[2]= ____(3)____;}
for(i=0;i<3; i++) putchar(t[i]);
putchar('\n');
}
main( )
{ char c;
do
{ printf(" enter a upper letter:");
c=getchar(); getchar();
}
while(!isupper(c));
fun(c);
}