programming-examples/c++/Others/Cout width example.cpp

17 lines
263 B
C++
Raw Normal View History

2019-11-15 12:59:38 +01:00
Cout width example
//illustrates setting cout width
#include <iostream.h>
#include <stdlib.h>
#include <iomanip.h>
int main()
{
cout<<setw(20)<<"setw(20)"<<endl;
cout<<setw(10)<<"setw(10)"<<endl;
cout<<setw(15)<<"setw(15)"<<endl;
return 0;
}