C++与C的输出对齐_半壶老酒-CSDN博客 首先看C++的:C++输出对齐需要包含头文件,当然对齐方式也分为左右两种,直接看代码更好理解。#include #includeusing namespace std;int main(){ int a = 9999; int b = 999; int c = 99; //默认右对齐 cout << "默认右对齐为:\n"; cout << setw(6) << a https://blog.csdn.net/LaoJiu_/article/details/50491399