#include <stdio.h>
#include <string.h>
int main()
{
//freopen("data.in","r",stdin);
//freopen("data.out","w",stdout);
char ch[1000];
gets(ch);
while(gets(ch)&&strcmp(ch,"___________"))
{
int len=strlen(ch);
char num,j;
num=0;
j=1;
for(int i=len-2;i>=1;i--)
{
if(ch[i]=='o')
{
num+=j;
j*=2;
}
else if(ch[i]==' ')
{
j*=2;
}
}
printf("%c",num);
}
return 0;
}
10878 - Decode the tape
最新推荐文章于 2025-06-10 08:29:31 发布
本文介绍了一个使用C语言实现的简单程序,该程序能够读取特定格式的二进制数并将其转换为对应的ASCII字符。通过解析输入字符串中的二进制数,程序能够逐个字符地输出转换结果。
493

被折叠的 条评论
为什么被折叠?



