文章
55
粉丝
100
获赞
12
访问
29.8k
#include<stdio.h>
int main(){
int n;
scanf("%d",&n);
printf("%o\n",n);
return 0;
}
#include <iostream>
#include <vector>
#include<string>
#include<algorithm>
using namespace std;
void conversion(int n){
int arr[1000] = {0};
int s = 0;
while(n){
int remain = n%8;
arr[s++] = remain;
n/=8;
}
for(int i = s-1; i>=0; i--){
cout<<arr[i];
}
}
int main(){
int n;
cin>>n;
conversion(n);
}
登录后发布评论
暂无评论,来抢沙发