摘要: #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; 阅读全文
posted @ 2019-12-22 12:35 刘桐123 阅读(118) 评论(2) 推荐(0)
摘要: /* 假定输入的字符串中只包含字母和*号。 编写函数,实现: 除了字符串前导和尾部的*号之外,将串中其他*号全部删除。 在编写函数时,不得使用C语言提供的字符串函数。 例如,若字符串中的内容为****A*BC*DEF*G******* 删除后,字符串中的内容则应当是****ABCDEFG****** 阅读全文
posted @ 2019-12-15 15:35 刘桐123 阅读(120) 评论(2) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> int main() { int year,month,day,leapyear; scanf("%d%d",&year,&month); if(year<0||month<1||month>12) { printf("输入的数据错误!\n"); exit(0); } leapyear=year%4==0&&year%100 阅读全文
posted @ 2019-11-03 15:21 刘桐123 阅读(124) 评论(3) 推荐(0)