- 博客(3)
- 收藏
- 关注
原创 n!
include<iostream> using namespace std; //子程序 int fact(int x){ int j=1; for(int i=1;i<=x;i++){ j=j*i; } return j; } //主程序 int main() { int x=0,m; x=fact(i); cout<<m<<endl; return 0; 如有问题,感谢纠正
2020-12-13 22:13:10
193
原创 回文素数
题目介绍:求出10000以内所有的即是回文数同时又是素数的自然数。 程序实现: #include<iostream> using namespace std; int x[10000]; int temp; int sum; int main() { for(int i=0; i<=10000; i++) { for(int j=2; j<=i; j++) { if(i%j!=0) { x[temp]=i; temp++; } } } for
2020-11-05 20:44:07
116
原创 c++学习日志(一)
第一部分: #include<iostream> using namespace std; typdef struct node{ int n; struct node *next; }*node; //定义自定义头文件 功能部分: bool start(node *head) { head->next=NULL; head->n=0; } bool listempty(node *head) { node->next=NULL; node->
2020-11-03 12:45:02
148
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人