会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
sunhope
博客园
首页
新随笔
联系
订阅
管理
2025年12月1日
实验4 组合和继承
摘要: task1: 1 #pragma once 2 3 #include <vector> 4 #include <array> 5 #include <string> 6 7 class GradeCalc { 8 public: 9 GradeCalc(const std::string &cnam
阅读全文
posted @ 2025-12-01 16:20 sunishope
阅读(2)
评论(0)
推荐(0)
2025年11月22日
实验3 类和对象
摘要: task1: 1 #pragma once 2 3 #include<iostream> 4 #include<string> 5 6 class Button{ 7 public: 8 Button(const std::string &label_); 9 const std::string&
阅读全文
posted @ 2025-11-22 23:39 sunishope
阅读(9)
评论(1)
推荐(0)
2025年10月25日
实验2 现代c++编程初体验
摘要: task1: 1 #pragma once 2 3 #include<string> 4 5 //类T声明 6 class T{ 7 public: 8 T(int x=0,int y=0);//普通构造函数 9 T(const T&t);//复制构造函数 10 T(T &&t);//移动构造函数
阅读全文
posted @ 2025-10-25 16:04 sunishope
阅读(9)
评论(1)
推荐(0)
2025年10月12日
实验1 现代c++编程初体验
摘要: 实验1 : 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<algorithm> 5 6 //模板函数声明 7 template<typename T> 8 void output(const T &c);
阅读全文
posted @ 2025-10-12 23:20 sunishope
阅读(10)
评论(1)
推荐(0)
2024年12月28日
实验7 文件应用编程
摘要: task4 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #define N 1000 5 6 int main() { 7 char x[N]; 8 char s[N]; 9 int i=0; 10 int line
阅读全文
posted @ 2024-12-28 22:55 sunishope
阅读(26)
评论(0)
推荐(0)
2024年12月17日
实验6 c语言结构体 枚举应用编程
摘要: 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 @ 2024-12-17 23:28 sunishope
阅读(41)
评论(0)
推荐(0)
2024年12月5日
实验5 c语言指针应用编程
摘要: 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* pmin, int* p
阅读全文
posted @ 2024-12-05 14:50 sunishope
阅读(41)
评论(0)
推荐(0)
2024年11月10日
实验4 c语言数组应用编程
摘要: task1: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define N 4 4 #define M 2 5 6 7 void test1(){ 8 int x[N]={1,9,8,4}; 9 int i; 10 11 printf("sizeof(x)
阅读全文
posted @ 2024-11-10 16:57 sunishope
阅读(47)
评论(0)
推荐(0)
2024年10月28日
实验3 c语言函数应用编程
摘要: task1: 1 #include<stdio.h> 2 3 char score_to_grade(int score); 4 5 int main() { 6 int score; 7 char grade; 8 9 while (scanf_s("%d",&score) != EOF) { 1
阅读全文
posted @ 2024-10-28 07:41 sunishope
阅读(37)
评论(0)
推荐(0)
2024年10月13日
实验2 c语言分支与循环基础应用编程1
摘要: task1: 问题1 随机数求余后结果为1,生成0397到0476中的随机数 问题2 随机数求余后结果为0,生成0001到0021中的随机数 问题3 随机生成5个不同的学号 task2: 实验3: task4: 1 #include <stdio.h> 2 int main() 3 { 4 doub
阅读全文
posted @ 2024-10-13 12:25 sunishope
阅读(14)
评论(0)
推荐(0)
下一页
公告