前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >[蓝桥杯]Hello, world!

[蓝桥杯]Hello, world!

作者头像
编程范 源代码公司
发布2018-04-16 11:48:42
9160
发布2018-04-16 11:48:42
举报

题目描述

This is the first problem for test. Since all we know the ASCII code, your job is simple: Input numbers and output corresponding messages.

输入

The input will contain a list of positive integers separated by whitespaces(spaces, newlines, TABs). Please process to the end of file (EOF). The integers will be no less than 32.

输出

Output the corresponding message. Note there is NOT a newline character in the end of output.

样例输入

代码语言:javascript
复制
72 101 108 108 111 44
32 119 111 114 108 100 33

样例输出

代码语言:javascript
复制
Hello, world!

提示

来源

解题思路:把读取的数字转换为对应的ascii码即可! 参考代码:

代码语言:javascript
复制
#include<stdio.h>
int main()
{
    int i=0,num[50],leng;
    while(scanf("%d",&num[i]) != EOF)
    {
        i++;
    }
    leng = i;
    for(i=0;i<leng;i++)
    printf("%c",num[i]);
    return 0;
}
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2017-04-29,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 编程范 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档