上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 56 下一页
摘要: C //计算每个学生成绩,并求和,计算平均数 #include <stdio.h> void main() { int scores[][4] = { //不足4个元素,用0补充 {100, 99, 98, 99,}, {78, 86, 77,}, {43, 56}, {} }; int sum = 阅读全文
posted @ 2020-07-02 10:59 profesor 阅读(183) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { char *names[] = {"ant", "tiger", "dog", "orange", "apple", "banana"}, **p = names; int i; for (i = 0; i < 6; ++i, p++) 阅读全文
posted @ 2020-07-02 10:09 profesor 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Longman Hardly a week goes by without some food scare being reported in the media.Hardly a month goes by without another factory closing down. Collins 阅读全文
posted @ 2020-07-01 22:48 profesor 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 生成骰子数 #include <stdio.h> #include <time.h> //time() #include <stdlib.h> //srand(), rand() void main() { srand(time(NULL)); for(int i = 0; i < 10; ++i) 阅读全文
posted @ 2020-06-30 10:26 profesor 阅读(172) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> typedef struct { long num; char name[10]; double score; } Stu; int main() { Stu stu[3] = {20115602l, "Jerry", 99.5, 20115600l, "Ela 阅读全文
posted @ 2020-06-29 16:47 profesor 阅读(576) 评论(0) 推荐(0) 编辑
摘要: 一: #include <stdio.h> int main(int argc, const char *argv[]) { int i; for (i = 0; i < argc; ++i) { printf("argv[%d] = %s\n", i, argv[i]); } return 0; 阅读全文
posted @ 2020-06-29 16:15 profesor 阅读(1240) 评论(0) 推荐(0) 编辑
摘要: import sys # print(help(sys.stdout)) sys.stdout.write("the quick brown fox jumps over the lazy dog.") #返回值是字符串长度 sys.stderr.write("to err is humane, t 阅读全文
posted @ 2020-06-26 20:32 profesor 阅读(788) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { char *temporadas[] = {"primavera", "verano", "otoño", "invierno"}; for (int i = 0; i < 4; ++i) { // printf("%c\n", *(( 阅读全文
posted @ 2020-06-26 20:16 profesor 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 获取时间 #include <stdio.h> #include <time.h> int main() { printf("%ld\n", time(NULL)); return 0; } 对应python中 import time print(time.time()) 生成随机骰子数: #inc 阅读全文
posted @ 2020-06-26 19:28 profesor 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 例://找出字符串中所有的is //找出字符串中所有的is #include <stdio.h> #include <string.h> int main(int argc, char const *argv[]) { char s[200] = "Work is like a capricious 阅读全文
posted @ 2020-06-26 18:45 profesor 阅读(1400) 评论(0) 推荐(0) 编辑
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 56 下一页