driver.cpp
来自「用循环链表实现的多项式 包括 运算符及io重载」· C++ 代码 · 共 38 行
CPP
38 行
#include "Polynomial.h"
#include <iostream>
using namespace std;
int main()
{
int n = 0;
cout<<"enter the number of terms in the polynomial a: ";
cin>>n;
Polynomial a(n);
cout<<"enter the number of terms in the polynomial b: ";
cin>>n;
Polynomial b(n);
cin>>a;
cin>>b;
cout<<a;
cout<<b;
Polynomial c(a);
cout<<c;
cout<<"enter the number of terms in the polynomial d: ";
cin>>n;
Polynomial d(n);
cin>>d;
d = b;
cout<<d;
float x;
cout<<"enter x to Evaluate polynomial a: ";
cin>>x;
cout<<a.Evaluate(x)<<endl<<endl;
cout<<a+b;
cout<<a-b;
cout<<a*b;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?