上一页 1 ··· 298 299 300 301 302 303 304 305 306 ··· 403 下一页
摘要: c语言中写入日期和时间。 1、 #include <stdio.h> #include <time.h> int main(void) { FILE *fp; time_t current = time(NULL); struct tm *timer = localtime(&current); i 阅读全文
posted @ 2021-06-08 12:39 小鲨鱼2018 阅读(1096) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> #include <time.h> // time_t数据类型,日历时间头文件 int main(void) { time_t current = time(NULL); // 利用time函数获取日历时间(返回1970之后的秒数,整型) struct t 阅读全文
posted @ 2021-06-08 12:28 小鲨鱼2018 阅读(2219) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> #define NUMBER 6 typedef struct{ char name[128]; double height; double weight; }Type1; int main(void) { FILE *fp; fp = fopen("xx 阅读全文
posted @ 2021-06-07 21:45 小鲨鱼2018 阅读(64) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> #include <string.h> typedef struct{ char name[128]; double height; double weight; }Type1; void swap2(Type1 *x, Type1 *y) { Type1 阅读全文
posted @ 2021-06-07 19:01 小鲨鱼2018 阅读(49) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> typedef struct{ char name[128]; double height; double weight; }Type1; void swap(Type1 *x, Type1 *y) { Type1 tmp = *x; *x = *y; * 阅读全文
posted @ 2021-06-07 18:44 小鲨鱼2018 阅读(39) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> typedef struct{ char name[128]; double height; double weight; }Typex; void swap(Typex *x, Typex *y) { Typex tmp = *x; *x = *y; * 阅读全文
posted @ 2021-06-07 16:25 小鲨鱼2018 阅读(36) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> #define NUMBER 5 void sort(int x[], int n) { int i, j; // i表示具体循环的轮数, j表示每一轮参与比较的元素的下标 for(i = 0; i < n - 1; i++)//一共循环的轮数n - 1, 阅读全文
posted @ 2021-06-07 09:57 小鲨鱼2018 阅读(988) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> int main(void) { FILE *fp; int lines = 0; double c1, c2, c3; double c1sum = 0, c2sum = 0, c3sum = 0; if((fp = fopen("a.txt","r") 阅读全文
posted @ 2021-06-06 22:34 小鲨鱼2018 阅读(652) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> int main(void) { FILE *fp; //打开文件前必须要定义FILE*型指针变量 int lines = 0; char name[128]; double height, weight; double hsum = 0, wsum = 阅读全文
posted @ 2021-06-06 22:17 小鲨鱼2018 阅读(350) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> int main(void) { FILE *fp; // 打开文件前,必须定义FILE*型指针变量 char file[128]; printf("please input the file: "); scanf("%s", file); fp = fo 阅读全文
posted @ 2021-06-06 20:50 小鲨鱼2018 阅读(48) 评论(0) 推荐(0)
上一页 1 ··· 298 299 300 301 302 303 304 305 306 ··· 403 下一页