![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
简单数学题
文章平均质量分 70
cjliux
这个作者很懒,什么都没留下…
展开
-
解方程组ax^2+bx+c=0
#include #include using namespace std; int main(void) { double a,b,c; while(cin >> a >> b >> c) { if(fabs(a)<1e-15) { cout << '(' <<a << ')' << "*x^2" << '+' << '(' << b << ')' << "*x" <<原创 2015-03-21 21:10:27 · 1485 阅读 · 0 评论 -
C++实现费马小定理素数测试
#include #include #include #include #include using namespace std; long long qmod(int a, int b, int p) { long long res = 1; long long term = a%p; while(b) { if(b&1){原创 2015-06-03 19:31:22 · 4109 阅读 · 0 评论 -
C++实现页码数字统计
#include #include #include #include #include #include #include #include #include #include using namespace std; int Str2Int(const string & s, int st, int ed) { int n = 0; for (int i = st; i < ed; +原创 2015-06-04 09:37:57 · 2664 阅读 · 0 评论 -
C++实现多项式操作及其加减乘除
/* * Polynomial.h * * Created on: Oct 6, 2015 * Author: chris */ #ifndef POLYNOMIAL_H_ #define POLYNOMIAL_H_ #include struct Term{ double coef; int exp; Term * next; Term():coef(0)原创 2015-10-06 23:40:51 · 8838 阅读 · 0 评论