大家帮忙完成个程序
以下程序的功能是:将不大于5位的无符号八进制数字构成的字符串转换为十进制整数,例如,输入的字符串是556,则输出十进制整数366,横线上填空#includes<stdio.h>
main()
{char *p,s[6];
int n;
p=s;
gets(______);
n=*p- '0';
while(______!='\0')
n=n*8+p- '0';
printf("%d\n",n);}
2009-11-05 23:24
2009-11-05 23:36