2021年12月16日
摘要: 实验任务2: Person.hpp: #include <iostream> #include <fstream> #include <vector> #include <string> #include <cstdio> using namespace std; class Person { pr 阅读全文
posted @ 2021-12-16 19:10 Giant邹薛成 阅读(37) 评论(1) 推荐(0) 编辑
  2021年11月26日
摘要: 实验任务二: (原代码) #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: void draw() { std::cout << "Graph::draw() : just a 阅读全文
posted @ 2021-11-26 14:04 Giant邹薛成 阅读(45) 评论(3) 推荐(0) 编辑
  2021年11月6日
摘要: 1、实验任务4: 动态int型数组类Vector_int的定义实现源码(vector_int.hpp): #include <iostream>using namespace std; class Vector_int {public: Vector_int(int n, int m = 6) : 阅读全文
posted @ 2021-11-06 14:58 Giant邹薛成 阅读(12) 评论(3) 推荐(0) 编辑
  2021年11月1日
摘要: 实验任务5 Info.cpp文件源码: #include <iostream> #include <string> #include <vector> using namespace std; class Info { public: Info(string NICKNAME, string CON 阅读全文
posted @ 2021-11-01 20:02 Giant邹薛成 阅读(28) 评论(3) 推荐(0) 编辑
  2021年10月23日
摘要: 实验3: 头文件“Complex.hpp” #include <iostream> using namespace std; #include <cmath> class Complex { public: Complex(double a = 0, double b = 0) : real(a), 阅读全文
posted @ 2021-10-23 19:25 Giant邹薛成 阅读(41) 评论(3) 推荐(0) 编辑
  2020年12月23日
摘要: 实验七: task1: 代码部分(原给代码): // 将file1.txt中小写字母转换成大写后,另存为file2.txt #include <stdio.h> #include <stdlib.h> int main() { FILE *fin, *fout; // 定义文件类型指针 int ch 阅读全文
posted @ 2020-12-23 17:47 Giant邹薛成 阅读(71) 评论(2) 推荐(0) 编辑
  2020年12月17日
摘要: 实验六: 第一: 代码: // P280例8.15 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include<stdio.h> #include<stdlib.h> #include<string.h> #define 阅读全文
posted @ 2020-12-17 22:38 Giant邹薛成 阅读(87) 评论(3) 推荐(2) 编辑
  2020年12月14日
摘要: 一: #include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名及下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a 阅读全文
posted @ 2020-12-14 11:23 Giant邹薛成 阅读(61) 评论(2) 推荐(0) 编辑
  2020年11月26日
摘要: 实验一: #include <math.h> #include <stdio.h> void solve(double a, double b, double c); int main() { double a, b, c; printf("Enter a, b, c: "); while(scan 阅读全文
posted @ 2020-11-26 21:56 Giant邹薛成 阅读(61) 评论(3) 推荐(0) 编辑
  2020年11月14日
摘要: #include <stdio.h> #include <math.h> #include<stdlib.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while( 阅读全文
posted @ 2020-11-14 23:08 Giant邹薛成 阅读(111) 评论(2) 推荐(0) 编辑