char *getmonth( int n ); 函数getmonth 应返回存储了 n 对应的月份英文名称的字符串头指针。如果传入的参数 n 不是一个代表月份的数字,则返回空指针NULL。 裁判测试程序样例: 代码语言:javascript 复制 #include<stdio.h>char*getmonth(int n);intmain(){int n;char*s;scanf("%d",&n);s=getmonth(n);...
习题11-1 输出月份英文名 (15 分) #include <stdio.h>char*getmonth(intn);intmain() {intn;char*s; scanf("%d", &n); s=getmonth(n);if(s == NULL) printf("wrong input!\n");elseprintf("%s\n", s); system("pause");return0; }/*你的代码将被嵌在这里*/char*getmonth(intn) {cha...
char*getmonth(intn ); 函数getmonth应返回存储了n对应的月份英文名称的字符串头指针。如果传入的参数n不是一个代表月份的数字,则返回空指针NULL。 裁判测试程序样例: #include <stdio.h>char*getmonth(intn );intmain() {intn;char*s; scanf("%d", &n); s=getmonth(n);if( s==NULL ) printf("wrong...
习题11-1输出月份英文名(15分)习题11-1输出⽉份英⽂名(15分)本题要求实现函数,可以返回⼀个给定⽉份的英⽂名称。函数接⼝定义:char *getmonth( int n );函数getmonth应返回存储了n对应的⽉份英⽂名称的字符串头指针。如果传⼊的参数n不是⼀个代表⽉份的数字,则返回空指针NULL。裁判...
习题11-1 输出月份英文名 (15 分) 本题要求实现函数,可以返回一个给定月份的英文名称。 函数接口定义: char*getmonth(intn ); 1. 函数getmonth应返回存储了n对应的月份英文名称的字符串头指针。如果传入的参数n不是一个代表月份的数字,则返回空指针NULL。
习题11-1 输出月份英文名 本题要求实现函数,可以返回一个给定月份的英文名称。 函数接口定义: char *getmonth( int n ); 函数getmonth应返回存储了n对应的月份英文名称的字符串头指针。如果传入的参数n不是一个代表月份的数字,则返回空指针NULL。 裁判测试程序样例: ...
习题11-1 输出月份英文名 (15 分) 1. 题目摘自 https://pintia.cn/problem-sets/12/problems/359 2. 题目内容 本题要求实现函数,可以返回一个给定月份的英文名称。 函数接口定义: char *getmonth( int n ); 函数getmonth应返回存储了n对应的月份英文名称的字符串头指针。如果传入的参数n不是一个代表月份的...