06 2024 档案

摘要:#include <iostream> using namespace std; int *shuzu(int *a){ for(int i=0;i<5;i++){ *(a+i)+=1; } return a; } int main(){ int a[]={1,2,3,4,5}; shuzu(a); 阅读全文
posted @ 2024-06-30 09:33 昵称就是最好的昵称 阅读(3) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> int main(){ int n=4,m=13,f,t,o,sum=0; for(int f=0;f<=m;f++){ for(int t=0;t<=m;t++){ for(int o=0;o<=m;o++){ if(f+t+o==4&&f*5+t*2+o* 阅读全文
posted @ 2024-06-28 19:45 昵称就是最好的昵称 阅读(6) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <cmath> using namespace std; double f(double x,double n){ if(n==1){ return x/(1+x); } return x/(n+f(x,n-1)); } int main() 阅读全文
posted @ 2024-06-22 09:53 昵称就是最好的昵称 阅读(15) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; int s(int n){ int x=1; if(n==1){ return 1; }else{ for(int i=1;i<=n;i++){ x*=i; } } return x+s(n-1); } int mai 阅读全文
posted @ 2024-06-22 08:33 昵称就是最好的昵称 阅读(3) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; int s(int n){ if(n<=2){ return n; } return n*s(n-1); } int main(){ int n; cin>>n; cout<<s(n); return 0; } 阅读全文
posted @ 2024-06-22 08:19 昵称就是最好的昵称 阅读(4) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main(){ int a,b[100],i=0,c=0; cin>>a; for(int i=0;a!=0;i++){ b[i]=a%2; a/=2; c++; } for(int j=c-1;j> 阅读全文
posted @ 2024-06-02 09:50 昵称就是最好的昵称 阅读(5) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main(){ string a; cin>>a; int b[a.size()],c; for(int i=a.size()-1,d=0;i>=0;i--){ b[i]=a[i]-'0'; c+=b 阅读全文
posted @ 2024-06-02 09:30 昵称就是最好的昵称 阅读(7) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; int main(){ int a[10],max; for(int i=0;i<10;i++){ cin>>a[i]; } for(int i=0;i<10;i++){ for(int j=9;j>i;j--){ i 阅读全文
posted @ 2024-06-02 08:35 昵称就是最好的昵称 阅读(5) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示