上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 87 下一页
摘要: /* 请写成下列宏定义 1.min(a,b) 求a,b的最小值 2.islower(c), 判断c是否为小写字母 3.isleap(year), 判断year是否为闰年 4.circumference(r), 计算半径为r的圆周长 */ #include <stdio.h> #define min( 阅读全文
posted @ 2020-06-05 17:41 profesor 阅读(213) 评论(0) 推荐(0)
摘要: //pointer to structure #include <stdio.h> struct Person { char name[10]; char character[20]; int age; }; void display(struct Person *t); int main() { 阅读全文
posted @ 2020-06-04 20:05 profesor 阅读(124) 评论(0) 推荐(0)
摘要: #include <stdio.h> struct Person { char name[10]; char character[20]; int age; }; void display(struct Person t); int main() { struct Person man = {"je 阅读全文
posted @ 2020-06-04 20:03 profesor 阅读(187) 评论(0) 推荐(0)
摘要: #include <stdio.h> struct Person { char name[10]; char character[20]; int age; }; int main() { struct Person man[2]; //创建结构变量数组 for (int i = 0; i < 2; 阅读全文
posted @ 2020-06-04 20:02 profesor 阅读(226) 评论(0) 推荐(0)
摘要: struct Person man1 = {"jerry", "fastidious", {"June", 4, 1965}, 34}; //注意这里的对应顺序,可以用curly brace把Birthday括起来 阅读全文
posted @ 2020-06-04 17:55 profesor 阅读(971) 评论(0) 推荐(0)
摘要: #include <stdio.h> struct date { int day; char month[10]; int year; }; void out(struct date); // 1.该行一定要置于struct date定义的下面, 2.struct date是新定义的一种数据结构,类 阅读全文
posted @ 2020-06-04 17:20 profesor 阅读(304) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> struct date { int day; //int month; char month[10]; int year; }; //别丢掉这里的逗号 int main() { struct date today; tod 阅读全文
posted @ 2020-06-04 16:16 profesor 阅读(116) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> int main() { char str[] = "there are plenty of good reasons "; char str0[] = "for a young person to choose to g 阅读全文
posted @ 2020-06-02 19:17 profesor 阅读(197) 评论(0) 推荐(0)
摘要: 提醒:在python3中,reduce被移到了functools里面 from functools import reduce str1 = 'the quick brown fox' str2 = ' jumps over ' str3 = 'the lazy dog.' print(reduce 阅读全文
posted @ 2020-06-02 19:09 profesor 阅读(1259) 评论(0) 推荐(0)
摘要: my_set = set() #create a new set, 虽然set的显示结果为{item, item1...},但是不能用{}来创建集合,应该{}默认是创建dict print(help(my_set)) #查看帮助 my_set.add('jerry') #添加元素用add,而非lis 阅读全文
posted @ 2020-05-31 09:58 profesor 阅读(328) 评论(0) 推荐(0)
上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 87 下一页