3244:练40.2 打印字符
练40.2打印字符
《信息学奥赛一本通 编程启蒙C++版》3241-3245(5题)
《信息学奥赛一本通 编程启蒙 C++版》 3241-3250(10题)
《信息学奥赛一本通 编程启蒙 C++版》 3241-3250(10题)_3245:练40.3 ascii码-CSDN博客
C程序:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n;
scanf("%d",&n);
//char ans;
//ans=char(n);
printf("%c\n",n );
return 0;
}
C++代码:
#include <iostream>
using namespace std;
int main()
{
int num;
cin >> num;
cout << (char)num;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,a[10005],x;
cin>>n;
for(int i=1;i<=n;i++){
cin>>x;
if(a[x]==0) cout<<x<<" ";
a[x]++;
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int ans;
cin>>ans;
char ch=ans;
cout<<ch<<endl;
return 0;
}
python3源程序:
"""
1.2编程基础之变量定义、赋值及转换 08 打印字符
http://noi.openjudge.cn/ch0102/08/
"""
# 用户输入ASCII码,并将输入的数字转为整型
a = int(input())
print( chr(a))
洛谷_P2437 蜜蜂路线_python写法_高精度加法
洛谷 B3617 题解
【洛谷】P3717 [AHOI2017初中组]cover 【python】
洛谷 P3817 小A的糖果 python解析
洛谷 python P4017 最大食物链计数
洛谷(Python) P4956 [COCI2017-2018#6] Davor
洛谷(Python) P4956 [COCI2017-2018#6] Davor_p4956 [coci2017-2018#6] davor pyth-CSDN博客