2 .查找星期: 定义一个指针数组,将下表的星期信息组织起来,输人一个字符串,在表中查找,若存在,输出该字符申在表中的序号,否则输出-1。试编写相应程序。Sunday1M
include<stdio.h> #include<string.h> void main() { int i,ri,repeat; char *date[]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}; char str[80]; scanf("%d",&repeat); getchar(); for(ri=1;ri<=repeat;ri++){ scanf("%s",str)...
int main(void){ int i;char string[50];char* a[7]={"Sunday","Monday","Tuesday","Wednesday...