上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 52 下一页
摘要: from functools import reduce i = int(input("input a number 1-10: ")) result = reduce(lambda a, b: a*b, [item for item in range(1,i+1)]) print(f'factor 阅读全文
posted @ 2020-06-06 20:57 profesor 阅读(121) 评论(0) 推荐(0) 编辑
摘要: JAVA:Math.ceil() , Math.floor() C: ceil(), floor() 阅读全文
posted @ 2020-06-06 09:08 profesor 阅读(133) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { int a = 0; while (a < 10){ printf("a is %d\n", a); if ( a == 5) goto OUT; a++; } OUT: printf("We're out of the loop.\n 阅读全文
posted @ 2020-06-06 07:56 profesor 阅读(73) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <string.h> typedef union Person { char name[10]; int age; } pinfo; int main() { pinfo man1; strcpy(man1.name, "Jerry"); pr 阅读全文
posted @ 2020-06-06 07:54 profesor 阅读(59) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <string.h> struct Person { char name[24]; char character[30]; int age; struct Birthday { int day; char month[10]; int year 阅读全文
posted @ 2020-06-05 22:23 profesor 阅读(182) 评论(0) 推荐(0) 编辑
摘要: JAVA public class BooksTest { public static void main(String[] args) { int i; for (i = 0; i < args.length; i++) { System.out.printf("args[%d] = %s\n", 阅读全文
posted @ 2020-06-05 20:40 profesor 阅读(271) 评论(0) 推荐(0) 编辑
摘要: def person(age, **otherInfo): print(age) print(type(otherInfo)) print(otherInfo) person(age=15, sex='male', height=175, weight=56.7, hair='long') 运行结果 阅读全文
posted @ 2020-06-05 20:15 profesor 阅读(296) 评论(0) 推荐(0) 编辑
摘要: /* 请写成下列宏定义 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 阅读(189) 评论(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 阅读(115) 评论(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 阅读(165) 评论(0) 推荐(0) 编辑
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 52 下一页