#include<stdio.h>
#include <stdlib.h>
typedef struct node
{
int data;
struct node *next;
}node;
int main()
{
int m,n;
node *p,*q,*top;
top=(struct node *)malloc(sizeof(struct node));
top->next=NULL;
scanf("%d",&m);
while(m!=0)
{
p=(struct node *)malloc(sizeof(struct node));
n=m%8;
p->data=n;
p->next=top->next;
top->next=p;
m=m/8;
}
while(top->next!=NULL)
{
top=top->next;
printf("%d",top->data);
}
printf("\n");
return 0;
}
十-八进制转换
最新推荐文章于 2022-06-18 18:07:53 发布