加法模拟器答案(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;
}

以上仅供参考
全部评论

相关推荐

1 收藏 评论
分享
牛客网
牛客企业服务