c语言课程设计实例
发布网友
发布时间:2022-04-27 06:07
我来回答
共1个回答
热心网友
时间:2022-06-27 09:42
#include<iostream.h>
void main()
{
char a[12][9]={{'j','a','n','u','a','r','y'},{'F','e','b','r','u','a','r','y'},{'m','a','r','c','h'},{'a','p','r','i','l'},{'m','a','y'},{'j','u','n','e'},{'j','u','l','y'},{'a','u','g','u','s','t'}, {'s','e','p','t','e','m','b','e','r'},{'o','c','t','o','b','e','r'},{'n','o','v','e','m','b','e','r'},{'D','e','c','e','m','b','e','r'}},(*p)[9]=a;
int b;
cout<<"输入月份:";
cin>>b;
cout<<"该月的英文单词是:"<<*(p+b-1)<<endl;
}
程序写到这分上,我都想自杀了.......用字符串应该会简单些,可是我没想好..只能这样了..