竞赛讨论区 > 加法模拟器答案(C++)
头像
陌南尘丷
发布于 2021-10-26 19:28
+ 关注

加法模拟器答案(C++)

#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;

int main()
{
    int a,b;
    cin>>a>>b;
    cout<<a<<"+"<<b<<"="<<a+b<<endl;
    cout<<right<<setw(7)<<a<<endl;
    cout<<"+"<<right<<setw(6)<<b<<endl;
    cout<<"-------"<<endl;
    cout<<right<<setw(7)<<a+b<<endl;
    return 0;
}

以上仅供参考

全部评论

(0) 回帖
加载中...
话题 回帖

本文相关内容

等你来战

查看全部

热门推荐