Sunday, 25 August 2013


C++ Program to Demonstrate setfill Manipulator

Code:
/*C++ Program to Demonstrate setfill Manipulator*/
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main(void)
{
 int a=100,b=200;
 clrscr();
 cout<<setfill('*');
 cout<<setw(5) << a <<setw(5) << b <<endl;
 cout<<setw(6) << a <<setw(6) << b <<endl;
 cout<<setw(7) << a <<setw(7) << b <<endl;
 getch();
}

Sample Output:


Comment bellow for your Query and Feedback

Related Posts :



0 comments:

Confused? Feel free to ask

Post a Comment