怎么把C语言中ASCⅡ码转换成中文字,关键是要四川文理学院这几个字

[复制链接]
查看11 | 回复2 | 2011-4-14 11:29:25 | 显示全部楼层 |阅读模式
printf(\"%c%c%c%c%c\\n\",a,b,a,b,a);像这样输入,但是输出确实四川文理学院
回复

使用道具 举报

千问 | 2011-4-14 11:29:25 | 显示全部楼层
<pre id=\"best-answer-content\" class=\"reply-text mb10\">#include stdio.h

char *str=\"四川文理学院\";

int main() {
int i = 0;
while (str != \'\\0\') {

if(str0) {

printf(\"%c%c\", str, str[i 1]);

i;

}

else {

printf(\"%c\", str);

}

i;
}
printf(\"\\n\");
return 0;
}

















<h4 class=\"ask\">追问





<pre class=\"replyask-text\" id=\"content-4066539\">能不能把文理学院掩盖,意思就是像密码的那样
回复

使用道具 举报

千问 | 2011-4-14 11:29:25 | 显示全部楼层
<pre class=\"replyask-text\" id=\"content-4120337\">不明白你的意思,是不是这样:
#include stdio.h
char *str=\"四川文理学院\";

int main()
{
int i = 0;
int a=strlen(str);
for(i=0;ia;i)
printf(\"*\");

printf(\"\\n\");
return 0;
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行