2021年12月15日

摘要: T1: Person.hpp 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 5 class Person { 6 public: 7 Person(){} 8 Person(string nm,string tel) 阅读全文
posted @ 2021-12-15 15:29 不做普朗克 阅读(31) 评论(3) 推荐(0) 编辑

2021年12月1日

摘要: T1: 1 #include <iostream> 2 #include <typeinfo> 3 4 // definitation of Graph 5 class Graph 6 { 7 public: 8 void draw() { std::cout << "Graph::draw() : 阅读全文
posted @ 2021-12-01 01:22 不做普朗克 阅读(28) 评论(3) 推荐(0) 编辑

2021年11月10日

摘要: T1: vector_int.hpp 1 #include<iostream> 2 using namespace std; 3 class Vector_int { 4 public: 5 Vector_int(int n); 6 Vector_int(int n, int value); 7 V 阅读全文
posted @ 2021-11-10 15:04 不做普朗克 阅读(46) 评论(3) 推荐(0) 编辑

2021年11月3日

摘要: T1: info.hpp 1 #include<iostream> 2 #include<string> 3 #include<iomanip> 4 using namespace std; 5 class info { 6 public: 7 info(string nm, string tel, 阅读全文
posted @ 2021-11-03 14:55 不做普朗克 阅读(27) 评论(3) 推荐(0) 编辑

2021年10月27日

摘要: T1: Complex.hpp 1 #include<iostream> 2 #include<cmath> 3 using namespace std; 4 class Complex { 5 public: 6 Complex() = default; 7 Complex(double r, d 阅读全文
posted @ 2021-10-27 12:10 不做普朗克 阅读(39) 评论(2) 推荐(0) 编辑

2020年12月31日

摘要: T1,T2:Done T3: 正确输出 生成了file3.dat 是正确的,并且是直观可读的 T4: 正确输出 是 非直观可读 #include <stdio.h> #include <stdlib.h> #define N 10 typedef struct student { int num; 阅读全文
posted @ 2020-12-31 11:46 不做普朗克 阅读(35) 评论(0) 推荐(0) 编辑

2020年12月24日

摘要: EX1 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 10 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; /*学生学号 */ char nam 阅读全文
posted @ 2020-12-24 12:42 不做普朗克 阅读(73) 评论(0) 推荐(0) 编辑

2020年12月17日

摘要: T1: #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-17 10:29 不做普朗克 阅读(58) 评论(0) 推荐(0) 编辑

2020年12月3日

摘要: T1:我认为应该不可以,return返回一个值,无法将两个结果都返回。 T2: // 利用局部static变量计算阶乘 #include <stdio.h> long long fac(int n); // 函数声明 int main() { int i,n; printf("Enter n: ") 阅读全文
posted @ 2020-12-03 09:19 不做普朗克 阅读(69) 评论(0) 推荐(0) 编辑

2020年11月19日

摘要: #include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, 阅读全文
posted @ 2020-11-19 13:29 不做普朗克 阅读(56) 评论(0) 推荐(0) 编辑