小X的加法难题

在这里插入图片描述
.
.
.
.
.
程序:

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
long long s1=0,s2=0,s3=0;
int bz=0;
char x;
int main()
{
	while (cin>>x)
	{
		if (x=='+')
		{
			bz=1;
			continue;
		}
		if (bz==0) s1=s1*10+(x-'0');
		if (bz==1) s2=s2*10+(x-'0');
	}
	s3=s1+s2;
	if (s3>100000000) printf("Large"); else printf("%lld",s3);
	return 0;
}
原文地址:https://www.cnblogs.com/YYC-0304/p/10292822.html