会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
twx123
博客园
首页
新随笔
联系
订阅
管理
2025年10月
OOP - 实验一
摘要: 任务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)
2024年12月
实验7 文件应用编程
摘要: 实验四: #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)
实验6 C语言结构体、枚举应用编程
摘要: 实验一: // P286例8.17 // 对教材示例代码作了微调,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息、打印所有学生信息均调用该模块实现 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把N
阅读全文
posted @ 2024-12-22 16:43 唐文鑫
阅读(14)
评论(0)
推荐(0)
实验5 C语言指针应用编程
摘要: 实验一: #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)
2024年11月
实验4 C语言数组应用编程
摘要: 实验一: #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)
2024年10月
实验3 C语言函数应用编程
摘要: 实验一: #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)
实验2 C语言分支与循环基础应用编程-1
摘要: 实验一: #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 C语言输入输出和简单程序编写
摘要: 实验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)
公告