64,654
社区成员
发帖
与我相关
我的任务
分享
#include<stdio.h>
int main()
{
char a='5',b='6';
printf("%d",a+b-'0'-'0');
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main()
{
string first("0101");
string second("1100");
for(int i=0; i<4; i++)
cout<<first[i]+second[i]-'0'-'0';
cout<<endl;
}
//output:1201
'1' - '0' == 1;
... ...
'9' - '0' == 9