摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; void k_system(int n,int k){ //n:十进制数,k为进制 int t=n; int m=0; int a[10]; 阅读全文
posted @ 2021-01-10 22:33 Maxwell· 阅读(377) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; bool hui_number(int n){ int t=n; int k=0; int a[10]; while(t>0){ //提前数的 阅读全文
posted @ 2021-01-10 22:23 Maxwell· 阅读(54) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; bool Narcissistic_number(int n){ int t=n; int a[3]; int k=0; while(t>0) 阅读全文
posted @ 2021-01-10 21:54 Maxwell· 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 用一维数组或二维数组打印杨辉三角 #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; int a[15][15]; int aa[1024]; void yang_2D(){//二维数组打印杨辉 阅读全文
posted @ 2021-01-10 21:04 Maxwell· 阅读(75) 评论(0) 推荐(0) 编辑
摘要: #include <stdlib.h> #include <math.h> #include <iostream> using namespace std; bool prime(int x){ for(int i=2;i*i<=x;i++){ if(x%i==0) return false; } 阅读全文
posted @ 2021-01-10 17:31 Maxwell· 阅读(32) 评论(0) 推荐(0) 编辑