当前位置:网站首页>输入和输出字符型数据
输入和输出字符型数据
2022-06-28 19:51:00 【Zaltana】
编写一个简单程序,用户输入2个字符型数据存储在变量中,并分别以字符形式和整数形式输出在屏幕上。
格式
输入格式:2个字符型数据,用逗号分隔
输出格式:输出两行The ASCII code of... is...(...处依次输出刚才输入的数据字符形式和整数形式)
样例
输入:A,B
输出:The ASCII code of A is65
The ASCII code of B is66
#include<bits/stdc++.h>
using namespace std;
int main( )
{
char a,b;
scanf("%c,%c",&a,&b);
printf("The ASCII code of %c is %d\n",a,a);
printf("The ASCII code of %c is %d\n",b,b);
return 0;
}边栏推荐
- Kaggle gastrointestinal image segmentation competition baseline
- Priority problem when local variables and global variables in C language have the same name (when local variables and global variables exist at the same time, local variables are preferred to be refer
- h5向日葵作业
- return new int[]{i + 1, mid + 1}; return {i + 1, mid + 1};
- 2022年P气瓶充装考试练习题及在线模拟考试
- Figure introduction to neural networks (GNN, GCN)
- The severity code indicates that the project file line prohibits the display of status errors. C1047 object or library file ".Lib" is different from other objects (such as "x64\release\main.obj")
- 2022年T电梯修理考试题库模拟考试平台操作
- UESTC (shenhengtao team) & JD AI (Mei Tao team) proposed a structured dual stream attention network for video Q & A, with performance SOTA! Better than the method based on dual video representation
- Head, tail view file
猜你喜欢

Bayesian Reference problem, mCMC and variational reference

Tencent tangdaosheng: facing the new world of digital and real integration, developers are the most important "architects"

颜色渐变的FontAwesome图标

Markdown mermaid种草(1)_ mermaid简介

严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C1047 对象或库文件“.lib”是使用与其他对象(如“x64\Release\main.obj”)不同的

Lecture 30 linear algebra Lecture 4 linear equations

easypoi

数字经济专家高泽龙:映客更名映宇宙,元宇宙会成为映客下一个增长引擎吗?

数字藏品,万字长文,你想知道的大部分问题都讲清楚了从业者必看

30讲 线性代数 第四讲 线性方程组
随机推荐
UESTC (shenhengtao team) & JD AI (Mei Tao team) proposed a structured dual stream attention network for video Q & A, with performance SOTA! Better than the method based on dual video representation
grep文本搜索工具
集合之ArrayList
Bluecmsv1.6 code audit
kettle(六):基于Kettle的数据库全量备份
TcWind 模式設定
社招两年半10个公司28轮面试面经
How strong a mathematical foundation does deep learning need?
jvm内存结构
April 10, 2022 -- take the first step with C -- use C from Net class library call method (not understood)
Kaggle腸胃道圖像分割比賽baseline
Markdown Mermaid Grass (1) Introduction à Mermaid
head、tail查看文件
echart:横向柱状图的类目文字位置调整
R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题
Can layoffs really save China's Internet?
Head, tail view file
2022 welder (elementary) special operation certificate examination question bank and answers
Kaggle肠胃道图像分割比赛baseline
internship:术语了解及着手写接口