摘要: #include <stdio.h> #include <string.h> int n = 1000000; int mark[1000001]; int main() { int N,M,j;//N和M为指定输出的质数范围 int c; memset(mark, 0, sizeof(mark)) 阅读全文
posted @ 2021-07-29 07:51 qingjiawen 阅读(167) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { int n = 15; int mark[16] = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int c; int j; for (c = 2; c * c <= n; c 阅读全文
posted @ 2021-07-29 07:36 qingjiawen 阅读(50) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <math.h> #define EPSILON 1e-6 double f(double x) { return 2 * pow(x, 3) - 4 * pow(x, 2) + 3 * x - 6; } double f_prime(doub 阅读全文
posted @ 2021-07-29 07:09 qingjiawen 阅读(156) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <math.h> #define EPSILON 1e-7 double bisection(int p, int q, double (*func)(int, int, double)); double f(int p, int q, dou 阅读全文
posted @ 2021-07-29 07:07 qingjiawen 阅读(263) 评论(0) 推荐(0) 编辑