17 lines
263 B
C++
17 lines
263 B
C++
|
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;
|
||
|
}
|