生活随笔
收集整理的這篇文章主要介紹了
小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
與50位技術專家面對面20年技術見證,附贈技術全景圖
總結
以上是生活随笔為你收集整理的小X的加法难题的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。