#include<stdio.h>
int main(){ /*八进制转换成十进制*/ char *p, s[6];//字符串的类型为char int n; p=s; gets(p); n=0; while(*p!='\0') { n=n*8+*p-'0'; //printf("n=%d *p-'0'=%d\n", n, *p-'0'); *p++; } printf("%d\n",n); return 0;}