B2004 对齐输出 题解

· · 题解

其实这是对我们格式输出的测试,写%8d就可以了。

代码:

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c;
    cin>>a>>b>>c;
    printf("%8d %8d %8d",a,b,c);
    return 0;
}