2025年10月11日
摘要:
任务一 源代码 // 现代C++标准库、算法库体验 // 本例用到以下内容: // 1. 字符串string, 动态数组容器类vector、迭代器 // 2. 算法库:反转元素次序、旋转元素 // 3. 函数模板、const引用作为形参 #include <iostream> #include <s
阅读全文
posted @ 2025-10-11 12:44
董建标
阅读(18)
推荐(0)
2023年12月17日
摘要:
task4 1 #include <stdio.h> 2 3 int main() { 4 5 int i=0; 6 char s; 7 8 FILE *fp; 9 fp=fopen("data4.txt","r"); 10 11 while(1){ 12 s=fgetc(fp); 13 if(s=
阅读全文
posted @ 2023-12-17 10:03
董建标
阅读(26)
推荐(0)
2023年12月11日
摘要:
task4 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[80]; // 作者 8 double sale
阅读全文
posted @ 2023-12-11 16:54
董建标
阅读(20)
推荐(0)
2023年11月27日
摘要:
task1.1 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int *pmi
阅读全文
posted @ 2023-11-27 16:54
董建标
阅读(31)
推荐(0)
2023年11月13日
摘要:
task1.1 1 #include <stdio.h> 2 #define N 4 3 4 void test1() { 5 int a[N] = {1, 9, 8, 4}; 6 int i; 7 8 // 输出数组a占用的内存字节数 9 printf("sizeof(a) = %d\n", si
阅读全文
posted @ 2023-11-13 17:30
董建标
阅读(30)
推荐(0)
2023年10月30日
摘要:
task1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 void print_text(int line, int col, char t
阅读全文
posted @ 2023-10-30 20:06
董建标
阅读(29)
推荐(0)
2023年10月16日
摘要:
task1 问题一:line17作用:限制随机数范围在374~465之间 问题二:程序功能:随时间变化,随机生成在202383290376374~202383290376465之间的数 task2 1 #include<stdio.h> 2 int main(){ 3 char a; 4 while
阅读全文
posted @ 2023-10-16 22:21
董建标
阅读(31)
推荐(0)
2023年9月30日
摘要:
Task1.1 1 #include<stdio.h> 2 #include<stdlib.h> 3 int main(){ 4 printf(" 0 \n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 printf(" 0 \n"); 8 printf("<
阅读全文
posted @ 2023-09-30 09:54
董建标
阅读(303)
推荐(0)