#include <stdio.h>
main()
{
char s[]="ABCCDA";
int k;
char c;
for(k=1;(c=s[k])!='\0';k++)
{
switch(c)
{
case 'A':putchar('%');continue;
case 'B':putchar('#');break;
case 'C':putchar('*');break;
case 'D':putchar('&');continue;
}
putchar('#');
}
}
以这段为例,会打印##*#*#&%
main()
{
char s[]="ABCCDA";
int k;
char c;
for(k=1;(c=s[k])!='\0';k++)
{
switch(c)
{
case 'A':putchar('%');continue;
case 'B':putchar('#');break;
case 'C':putchar('*');break;
case 'D':putchar('&');continue;
}
putchar('#');
}
}
以这段为例,会打印##*#*#&%
代替leisure1980广告下: 群号45146331