C语言求同构数.docVIP

  • 291
  • 0
  • 约2.19千字
  • 约 5页
  • 2017-01-25 发布于重庆
  • 举报
C语言求同构数

C语言求同构数:求指定区间内的同构数 c语言 输出从m到n的孪生素数对 c语言折半查找法 #include stdio.h #include string.h void main() { int cz(int a,int x,int y,int c[]); int gh[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int h,w; scanf(%d,h); w = cz(h, 0, 9, gh); if (w != -1) { printf(%d, gh[w]); } else { printf(没找到\n); } getch(); } int cz(int a,int x,int y,int c[]) { int m; if (x y) return -1; m = (x + y) / 2; if (a == c[m]) { return m; } i

文档评论(0)

1亿VIP精品文档

相关文档