Showing posts with label how to fill padding in cplusplus program. Show all posts
Showing posts with label how to fill padding in cplusplus program. Show all posts

Saturday, 31 January 2015

Setfill('*') Function in C++

Structure of the Problem Requirements 

 The setfill function exist in iomanip library in C++ and it used to fill the padding which created through setw(3) function. The setfill function always used with setw(3) function and it take only one parameter (symbol) for filling.

Source Code

#include<iostream>
#include<iomanip>
using namespace std;
int main ()
{
cout<<(" \t \t \t LEP Tutorials\n \n \n");
cout<< setfill('>')<<setw(20);
cout<<(" 1.C++ \n");
cout<< setfill('>')<<setw(21);
cout<<(" 2.Java \n");
cout<< setfill('>')<<setw(21);
cout<<(" 3.HTML \n");
cout<< setfill('>')<<setw(20);
cout<<(" 4.CSS \n");
cout<< setfill('>')<<setw(20);
cout<<(" 5.SEO \n");
}

Output of the Program

Setfill('*') Function in C++