上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 82 下一页
摘要: #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 阅读(617) 评论(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 阅读(1298) 评论(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 阅读(804) 评论(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 阅读(155) 评论(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 阅读(203) 评论(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 阅读(1421) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <ctype.h> void upper(char *x) { while (*x != '\0') { *x = toupper(*x); x++; } } int main() { char s[] = "De poca estabilid 阅读全文
posted @ 2020-06-20 08:10 profesor 阅读(141) 评论(0) 推荐(0)
摘要: students = [("jerry", 25), ("elaine", 24), ("John", 34), ("kramer", 34)] #把年龄在30以上的学生信息提取出来 print([item for item in students if item[1] > 30]) #把年龄在30 阅读全文
posted @ 2020-06-18 20:49 profesor 阅读(156) 评论(0) 推荐(0)
摘要: 用strchr搜索字符,并把搜索到的字符串保存到新字符串中 #include <stdio.h> #include <string.h> #include <stdlib.h> //用于malloc(), free()函数 int main() { char s[] = "Bienvenidos a 阅读全文
posted @ 2020-06-18 19:36 profesor 阅读(211) 评论(0) 推荐(0)
摘要: 找出字符串Bienvenidos a todos中所有的字符e #include <stdio.h> #include <string.h> int main() { char s[] = "Bienvenidos a todos"; char * p = strchr(s, 'e'); //通过这 阅读全文
posted @ 2020-06-18 19:26 profesor 阅读(217) 评论(0) 推荐(0)
上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 82 下一页