一个小程序,帮忙简化,谢谢
#include<stdio.h>main()
{
int t[28]={'a','b','a','b','c','a','b','c','a','c','b','a','b','c','a','c','b','b','a','a','c','c','a','b','c','c','a','a'};
int p[5]={'a','b','c','a','c'};
int i,j=0;
for(i=0;i<=23;i++)
{
if(t[i]=p[j])
{
if(j<=4)
j++;
else
{
printf("t include p\n");
printf("i=%d\n",i);
break;
}
}
else
printf("t do not include p/n");
}
}