摘要: 思路:就是将素数的数组置为0. 1、初始化a[n]-a[n]为1-n; 2、a[1]=0; 3、将a[1]-a[n]中为素数的置为0,即a[i]=0; 4、输出数组,将不为0的输出。 #include<stdio.h> #include<math.h> #include<malloc.h> #inc 阅读全文
posted @ 2020-05-24 22:00 dreamy_java 阅读(284) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<math.h> #include<malloc.h> #include<string.h> #include<stdlib.h> #include <time.h> /* 冒泡排序 */ void rankNum(int num[],int n) 阅读全文
posted @ 2020-05-24 16:28 dreamy_java 阅读(191) 评论(0) 推荐(0) 编辑
摘要: /* 计算字符串中子串出现的次数。 */ #include<stdio.h> #include<math.h> #include<malloc.h> #include<string.h> #include<stdlib.h> /* 10进制转8进制 */ int convertDecimalToOc 阅读全文
posted @ 2020-05-24 14:25 dreamy_java 阅读(448) 评论(0) 推荐(0) 编辑