摘要:
part2 #ifndef GRAPH_H #define GRAPH_H // 类Graph的声明 class Graph { public: Graph(char ch, int n); // 带有参数的构造函数 void draw(); // 绘制图形 private: char symbol 阅读全文
摘要:
#include #include using namespace std; class Complex{ public: Complex(double a=0,double b=0) ; Complex(Complex &x); void add(Complex x); void show(); double mod(); private... 阅读全文
摘要:
1.函数重载add() 2.快速排序 #include<iostream>using namespace std;template<class X>X Quicksort(X a[],int low,int high){ if(low>=high) { return 0; } int n1=low; 阅读全文
摘要:
2-28 if-else语句 switch语句 2-29 while语句 #include<iostream>using namespace std;int main(){ int i=1,j; while(i<=100){ for(j=2;j<i;j++){ if(i%j==0)break;}if 阅读全文