摘要: 任务1:代码: #include <iostream> #include <string> #include <vector> #include <algorithm> template<typename T> void output(const T &c); void test1(); void 阅读全文
posted @ 2025-10-17 18:34 唐文鑫 阅读(9) 评论(1) 推荐(0)
摘要: 实验四: #include<stdio.h> #define N 100 int main(){ int m=0,i,num=0 ; char a[N] ; FILE *fp ; fp=fopen("data4.txt","r") ; if(!fp){ printf("failed to open. 阅读全文
posted @ 2024-12-30 19:04 唐文鑫 阅读(8) 评论(0) 推荐(0)
摘要: 实验一: // P286例8.17 // 对教材示例代码作了微调,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息、打印所有学生信息均调用该模块实现 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把N 阅读全文
posted @ 2024-12-22 16:43 唐文鑫 阅读(14) 评论(0) 推荐(0)
摘要: 实验一: #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pmin, int *pmax); 阅读全文
posted @ 2024-12-08 17:14 唐文鑫 阅读(16) 评论(0) 推荐(0)
摘要: 实验一: #include<stdio.h> #define N 4 #define M 2 void test1(){ int x[N] = {1,9,8,4}; int i; printf("sizeof(x)=%d\n",sizeof(x)); for(i=0;i<N;++i) printf( 阅读全文
posted @ 2024-11-10 16:12 唐文鑫 阅读(33) 评论(0) 推荐(0)
摘要: 实验一: #include <stdio.h> char score_to_grade(int score); // 函数声明 int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = score_ 阅读全文
posted @ 2024-10-28 22:55 唐文鑫 阅读(25) 评论(0) 推荐(0)
摘要: 实验一: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 397 #define N2 476 #define N3 21 int main() { int cnt; int random 阅读全文
posted @ 2024-10-15 22:43 唐文鑫 阅读(15) 评论(0) 推荐(0)
摘要: 实验1: #include<stdio.h> int main() { printf(" 0\n"); printf("<H>\n"); printf("I I\n"); return 0; } 实验2: #include <stdio.h> int main() { double a,b,c; s 阅读全文
posted @ 2024-10-02 15:00 唐文鑫 阅读(92) 评论(0) 推荐(0)