摘要: #include<bits/stdc++.h> using namespace std; int main(){ int n,s[100],z; cin>>n; for(int i=0;i!=0;i++){ s[i]=n%2; z++; n/=2; } for(int i=z-1;i>=0;i--) 阅读全文
posted @ 2024-06-02 08:56 爱吃泡面的皮卡 阅读(22) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> using namespace std; int main() { cout<<"input a number:"<<endl; int d; vector<int> vec; cin>>d; while (d) { vec 阅读全文
posted @ 2024-06-02 08:55 爱吃泡面的皮卡 阅读(79) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main() { long n; int p,c,m=0,s[100]; cout<<"输入要转换的数字:"<<endl; cin>>n; cout<<"输入要转换的进制:"<<endl; cin>>p; co 阅读全文
posted @ 2024-06-02 08:54 爱吃泡面的皮卡 阅读(36) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; int main(){ int n,s=1; cin>>n; while(n>0){ cout<<n%2; s++; n/=2; } return 0; } 阅读全文
posted @ 2024-06-02 08:52 爱吃泡面的皮卡 阅读(29) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main(){ int a[11]; for(int i=0;i<10;i++){ cin>>a[i]; } for(int i=0;i<10;i++){ for(int j=9;j>i;j--){ if(a[ 阅读全文
posted @ 2024-06-02 08:33 爱吃泡面的皮卡 阅读(22) 评论(0) 推荐(0)