📄 testprog.cpp
字号:
//Test program: Polynomial Operations
#include <iostream>
#include "polynomialType.h"
using namespace std;
int main()
{
polynomialType p(8); //Line 1
polynomialType q(4); //Line 2
polynomialType t; //Line 3
cin>>p; //Line 4
cout<<endl<<"Line 5: p(x): "<<p
<<endl; //Line 5
cout<<"Line 6: p(5): "<<p(5)
<<endl<<endl; //Line 6
cin>>q; //Line 7
cout<<endl<<"Line 8: q(x): "<<q
<<endl<<endl; //Line 8
t = p + q; //Line 9
cout<<"Line 10: p(x) + q(x): "
<<t<<endl; //Line 10
cout<<"Line 11: p(x) - q(x): "
<<p - q<<endl; //Line 11
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -