摘要: 四、实验结论 1.实验二 #ifndef PERSON_HPP #define PERSON_HPP #include <iostream> #include <string> #include <utility> using namespace std; class Person { privat 阅读全文
posted @ 2021-12-14 20:01 deemmo 阅读(31) 评论(3) 推荐(0) 编辑
摘要: 一、实验任务2 #include <iostream> #include <typeinfo> // definitation of Graph class Graph { public: virtual void draw() { std::cout << "Graph::draw() : jus 阅读全文
posted @ 2021-12-01 20:29 deemmo 阅读(31) 评论(3) 推荐(0) 编辑
摘要: 一、实验结论 1.实验任务4 #ifndef VECTOR_INT_HPP #define VECTOR_INT_HPP #include <iostream> using namespace std; class Vector_int{ public: Vector_int(int nn,int 阅读全文
posted @ 2021-11-08 21:09 deemmo 阅读(33) 评论(3) 推荐(0) 编辑
摘要: 四、实验结论 1.实验五 #include <string> #include <iostream> #include <vector> using namespace std; class Info{ public: Info(string nname,string co,string ct,in 阅读全文
posted @ 2021-10-29 17:28 deemmo 阅读(48) 评论(3) 推荐(0) 编辑
摘要: 一、实验结论 1.实验任务3 #include "Complex.hpp" #include <iostream> int main() { using namespace std; Complex c1(5, -3); const Complex c2(2.8); Complex c3(c1); 阅读全文
posted @ 2021-10-21 14:56 deemmo 阅读(166) 评论(3) 推荐(0) 编辑
摘要: 问题: 运行程序,观察在屏幕上是否正确输出了按分数由高→低排序的信息?同时,在当前路径下,是 否生成了文本文件file3.dat? 尝试用记事本程序打开文件file3.dat,观察里面的数据信息是否是正确的,并且是直观可读的? 结合操作结果回答: 1.是;是; 2.是;是。 实验任务四 1.子任务一 阅读全文
posted @ 2020-12-27 12:51 deemmo 阅读(109) 评论(1) 推荐(0) 编辑
摘要: 实验任务一 // P280例8.15 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 // 阅读全文
posted @ 2020-12-23 19:28 deemmo 阅读(39) 评论(1) 推荐(0) 编辑
摘要: 实验任务一 #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", 阅读全文
posted @ 2020-12-09 14:21 deemmo 阅读(70) 评论(1) 推荐(0) 编辑
摘要: 一、实验任务一 #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(s 阅读全文
posted @ 2020-11-25 20:20 deemmo 阅读(74) 评论(1) 推荐(0) 编辑
摘要: 实验任务一 #include <stdio.h> #include <math.h> int main(){ float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f" 阅读全文
posted @ 2020-11-12 15:10 deemmo 阅读(173) 评论(1) 推荐(0) 编辑