您的位置:首页 > 其它

密码发生器(蓝桥杯2012) 关于字符与ascii计算问题

2018-02-01 12:07 357 查看
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int a,b,c;
a='A';
b='B';
c='A'+'B';
cout<<a<<b<<c<<endl;
return 0;
}


6566131

Process returned 0 (0x0)   execution time : 0.866 s
Press any key to continue.

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{

int a[10];

char str[100];

scanf("%s",str);
a[0]=str[0];
a[0]+=str[1];
cout<<a[0];
return 0;
}

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: