摘要: https://www.cnblogs.com/liyuquan/p/8678359.html 阅读全文
posted @ 2019-02-15 22:35 f-- 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 1 public class Main{ 2 public static int binarySearch(int a[],int x,int n) { 3 int left=0; 4 int right=n-1; 5 while(left<=right) { 6 int middle=(left+rig... 阅读全文
posted @ 2019-01-01 18:46 f-- 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1 public class Main{ 2 public static int q(int n,int m) { 3 if(m<1||n<1) { 4 return 0; 5 } 6 if(m==1||n==1) { 7 return 1; 8 } 9 ... 阅读全文
posted @ 2019-01-01 18:21 f-- 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1 public class Main{ 2 public static int list[]= {1,2,3}; 3 public static void swap(int list[],int k,int m){ 4 int temp=list[k]; 5 list[k]=list[m]; 6 list[m]=tem... 阅读全文
posted @ 2019-01-01 14:59 f-- 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #define maxlen 100 4 #define eps 0.5*1e-5 5 double a=0; 6 double b=1; 7 double f(double x){ 8 return 4/(1+x*x); 9 } 10 double t(int n){ 11 int i; 12 ... 阅读全文
posted @ 2018-12-13 23:24 f-- 阅读(860) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 double fx(int x){ 4 double result=exp (-x*x); 5 return result; 6 } 7 8 int main(){ 9 int i; 10 for(i=-1;i<=2;i++){ 11 printf("x=%d,y=%f\n",... 阅读全文
posted @ 2018-11-29 21:42 f-- 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 int main() 5 { int i,number; 6 double out; 7 srand((unsigned) time(NULL)); 8 for (i=0; i<50; i++) 9 { 10 number = rand() % 101; 11 out=number*1.0; 12 ... 阅读全文
posted @ 2018-10-07 17:09 f-- 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int MAXN = 10000; 8 double a[MAXN][MAXN]; 9 double b[MAXN]; 10 double x[MAXN]; 11 int main() 12 { 1... 阅读全文
posted @ 2018-10-07 17:04 f-- 阅读(191) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/leader880022/article/details/44886031 阅读全文
posted @ 2018-10-07 16:25 f-- 阅读(364) 评论(0) 推荐(0) 编辑
摘要: https://jingyan.baidu.com/article/90895e0f2b982764ec6b0be0.html 阅读全文
posted @ 2018-09-24 09:37 f-- 阅读(168) 评论(0) 推荐(0) 编辑