摘要: 当我纠结于怎么输出n个空格的时候, 一个内置方法轻描淡写地就把问题给解决了: cout<<setw(n)<<n<<endl; 打印n个空格(为了辨别,后面加了一个字母n)不过要加#include <iomanip>下面做一个简单的练习:打印一个菱形框实现方法如下:View Code 1 #include "stdafx.h" 2 #include <iomanip> 3 #include <iostream> 4 using namespace std; 5 6 7 int _tmain(int arg 阅读全文
posted @ 2011-12-09 17:16 AnnieBy 阅读(336) 评论(0) 推荐(0) 编辑