怎么左对齐输出?

P1443 马的遍历

https://blog.csdn.net/qq_44627816/article/details/116497412
by Resolute_Faith @ 2022-07-20 22:41:36


多用用百度
by Resolute_Faith @ 2022-07-20 22:41:56


```cpp cout << std::left << setw(5) << a[i]; ``` @[ttltony](https://www.luogu.com.cn/user/709380)
by Orange1015 @ 2022-07-22 20:38:04


@[ttltony](/user/709380) ``` for(int i = 1; i <= n; i++) //输出现在的棋盘 { for(int j = 1; j <= m; j++) { printf("%-5d", a[i][j]); } cout << endl; } ```
by I_AK_IOI_7894 @ 2022-07-26 11:58:49


@[ttltony](/user/709380) [这里](http://iwo.im/?q=%E6%80%8E%E4%B9%88%E5%B7%A6%E5%AF%B9%E9%BD%90%E8%BE%93%E5%87%BA%3F)
by GGapa @ 2022-07-26 18:25:10


谢谢大佬们(我习惯用printf,因为有一次用cout超时了)
by ttltony @ 2022-07-26 20:11:15


|