回顾:入学规则
Coddy 面向 Python 开发者的 C 课程的第 11 课,共 48 课。
挑战
中等输入为年龄和票务整数。只有年龄至少为 12 且票务值恰好为 1 时才予以准入。准入时返回 1,否则返回 0。
编辑未锁定的源文件和头文件。确保声明的公共 API 与可见的锁定文件 main.c 兼容,该文件会直接调用它。不要添加另一个 main。除非任务明确检查数值范围,否则所有数值任务数据都足够小,不会溢出。只打印指定的输出;显示驱动程序时,由驱动程序负责解析输入和生成输出。
亲手试试
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
#include <limits.h>
#include <errno.h>
#include "lesson.h"
int main(void){int a=0,b=0;if(scanf("%d%d",&a,&b)!=2)return 1;printf("%d\n",admit(a,b));return 0;}
面向 Python 开发者的 C中的所有课
自己练习: C 在线编译器